about summary refs log tree commit diff stats
path: root/.emacs.d/lisp
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-10-12 13:32:55 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-10-12 13:32:55 +0100
commit901800109697f906d7eb2cf433dbcd3c5ed256f4 (patch)
tree1cd446aded40909821cc2ff88e0540ae1d9c6956 /.emacs.d/lisp
parent130bc0a521002244efafbb8feda597a272913c16 (diff)
downloaddotfiles-901800109697f906d7eb2cf433dbcd3c5ed256f4.tar.gz
Move affe config into init-search.el
Diffstat (limited to '.emacs.d/lisp')
-rw-r--r--.emacs.d/lisp/init-navigation.el27
-rw-r--r--.emacs.d/lisp/init-search.el27
2 files changed, 27 insertions, 27 deletions
diff --git a/.emacs.d/lisp/init-navigation.el b/.emacs.d/lisp/init-navigation.el
index cb2a39e..e41eb9e 100644
--- a/.emacs.d/lisp/init-navigation.el
+++ b/.emacs.d/lisp/init-navigation.el
@@ -40,33 +40,6 @@
   ("M-P" . symbol-overlay-switch-backward)
   ("<f8>" . symbol-overlay-remove-all))
 
-(use-package affe
-  :after (consult orderless)
-  :config
-  (setq affe-grep-command (replace-regexp-in-string "\\." "-Suu ." affe-grep-command))
-  ;; Configure Orderless
-  (defun affe-orderless-regexp-compiler (input _type _ignorecase)
-    (setq input (orderless-pattern-compiler input))
-    (cons input (lambda (str) (orderless--highlight input str))))
-  (setq affe-regexp-compiler #'affe-orderless-regexp-compiler)
-  ;; Manual preview key for `affe-grep'
-  (consult-customize affe-grep :preview-key (kbd "M-."))
-  (defun my/affe-grep-symbol-at-point (&optional dir initial)
-    (interactive
-     (list prefix-arg (when-let ((s (symbol-at-point)))
-                        (symbol-name s))))
-    (affe-grep dir initial))
-  (defun my/affe-find-symbol-at-point (&optional dir initial)
-    (interactive
-     (list prefix-arg (when-let ((s (symbol-at-point)))
-                        (symbol-name s))))
-    (affe-find dir initial))
-  :bind
-  ("C-#" . affe-grep)
-  ("C-c z" . affe-find)
-  ("C-c Z" . my/affe-find-symbol-at-point)
-  ("C-~" . my/affe-grep-symbol-at-point))
-
 (use-package gumshoe
   :defer 5
   :after perspective
diff --git a/.emacs.d/lisp/init-search.el b/.emacs.d/lisp/init-search.el
index b3986ec..38aceb4 100644
--- a/.emacs.d/lisp/init-search.el
+++ b/.emacs.d/lisp/init-search.el
@@ -46,5 +46,32 @@
 
 (use-package deadgrep)
 
+(use-package affe
+  :after (consult orderless)
+  :config
+  (setq affe-grep-command (replace-regexp-in-string "\\." "-Suu ." affe-grep-command))
+  ;; Configure Orderless
+  (defun affe-orderless-regexp-compiler (input _type _ignorecase)
+    (setq input (orderless-pattern-compiler input))
+    (cons input (lambda (str) (orderless--highlight input str))))
+  (setq affe-regexp-compiler #'affe-orderless-regexp-compiler)
+  ;; Manual preview key for `affe-grep'
+  (consult-customize affe-grep :preview-key (kbd "M-."))
+  (defun my/affe-grep-symbol-at-point (&optional dir initial)
+    (interactive
+     (list prefix-arg (when-let ((s (symbol-at-point)))
+                        (symbol-name s))))
+    (affe-grep dir initial))
+  (defun my/affe-find-symbol-at-point (&optional dir initial)
+    (interactive
+     (list prefix-arg (when-let ((s (symbol-at-point)))
+                        (symbol-name s))))
+    (affe-find dir initial))
+  :bind
+  ("C-#" . affe-grep)
+  ("C-c z" . affe-find)
+  ("C-c Z" . my/affe-find-symbol-at-point)
+  ("C-~" . my/affe-grep-symbol-at-point))
+
 (provide 'init-search)
 ;;; init-search.el ends here