From 6422bea95f652c78e7a60de8704155b36c592671 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Mon, 7 Oct 2024 14:10:29 +0100 Subject: Move consult xref config into xref config --- .emacs.d/lisp/init-editor.el | 5 ++++- .emacs.d/lisp/init-minibuffer.el | 5 ----- 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 -- cgit 1.4.1-2-gfad0