about summary refs log tree commit diff stats
path: root/.emacs.d/lisp/init-search.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/init-search.el')
-rw-r--r--.emacs.d/lisp/init-search.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el
index 40b4005..c9a8305 100644
--- a/.emacs.d/lisp/init-search.el
+++ b/.emacs.d/lisp/init-search.el
@@ -24,5 +24,22 @@
   :after isearch
   :bind (:map isearch-mode-map ("M-/" . isearch-dabbrev-expand)))
 
+(use-package anzu
+  :diminish
+  :config
+  (global-anzu-mode)
+  (set-face-attribute 'anzu-mode-line nil :foreground "yellow" :weight 'bold)
+  :custom
+  (anzu-deactivate-region t)
+  (anzu-search-threshold 1000)
+  (anzu-replace-threshold 100)
+  (anzu-replace-to-string-separator " => ")
+  :bind
+  ([remap query-replace] . anzu-query-replace)
+  ([remap query-replace-regexp] . anzu-query-replace-regexp)
+  (:map isearch-mode-map
+        ([remap isearch-query-replace] . anzu-isearch-query-replace)
+        ([remap isearch-query-replace-regexp] . anzu-isearch-query-replace-regexp)))
+
 (provide 'init-search)
 ;;; init-search.el ends here