Skip to content

Commit

Permalink
Ensure consult-xref functionality is initialised
Browse files Browse the repository at this point in the history
  • Loading branch information
deejayem committed Sep 20, 2024
1 parent b946560 commit f260d68
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .emacs.d/lisp/init-minibuffer.el
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ 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

;; Optionally configure the register formatting. This improves the register
Expand All @@ -257,10 +262,6 @@ DEFS is a plist associating completion categories to commands."
;; This adds thin lines, sorting and hides the mode line of the window.
(advice-add #'register-preview :override #'consult-register-window)

;; Use Consult to select xref locations with preview
(setq xref-show-xrefs-function #'consult-xref
xref-show-definitions-function #'consult-xref)

(add-to-list 'consult-mode-histories '(cider-repl-mode cider-repl-input-history))

(defun consult-ripgrep-auto-preview (&optional dir initial)
Expand Down

0 comments on commit f260d68

Please sign in to comment.