about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2024-10-07 14:10:29 +0100
committerDavid Morgan <djm_uk@protonmail.com>2024-10-07 14:10:29 +0100
commit6422bea95f652c78e7a60de8704155b36c592671 (patch)
tree45e887dcb52fb1b4e397f08bdeb46ade4f91f4a9
parent9dd74d2b9807608576b82d5b44100c997bdcb36d (diff)
downloaddotfiles-6422bea95f652c78e7a60de8704155b36c592671.tar.gz
Move consult xref config into xref config
-rw-r--r--.emacs.d/lisp/init-editor.el5
-rw-r--r--.emacs.d/lisp/init-minibuffer.el5
2 files changed, 4 insertions, 6 deletions
diff --git a/.emacs.d/lisp/init-editor.el b/.emacs.d/lisp/init-editor.el
index 7849eda..a3dceae 100644
--- a/.emacs.d/lisp/init-editor.el
+++ b/.emacs.d/lisp/init-editor.el
@@ -170,7 +170,10 @@
 
 (use-package xref
   :ensure `(xref :build ,(+elpaca-xref-build-steps))
-  :custom (xref-search-program 'ripgrep)
+  :custom
+  (xref-search-program 'ripgrep)
+  (xref-show-xrefs-function #'consult-xref)
+  (xref-show-definitions-function #'consult-xref)
   :config
   (defun xref-find-references-current-defun ()
     "`xref-find-references' for the enclosing defun."
diff --git a/.emacs.d/lisp/init-minibuffer.el b/.emacs.d/lisp/init-minibuffer.el
index c9fc506..92934c3 100644
--- a/.emacs.d/lisp/init-minibuffer.el
+++ b/.emacs.d/lisp/init-minibuffer.el
@@ -321,11 +321,6 @@ DEFS is a plist associating completion categories to commands."
                ("M-P" . consult-toggle-preview)
                ("C-x C-M-x" . remove-leading-hash)))
 
-  :init
-  ;; Use Consult to select xref locations with preview
-  (setq xref-show-xrefs-function #'consult-xref
-        xref-show-definitions-function #'consult-xref)
-
   :config
 
   ;; Configure register formatting. This improves the register