jacktasia / dumb-jump

an Emacs "jump to definition" package for 50+ languages
GNU General Public License v3.0
1.57k stars 150 forks source link

Works together perfectly with Consult for live previewing definition candidates #431

Open MagielBruntink opened 1 year ago

MagielBruntink commented 1 year ago

Not a reporting a problem here, just a very nice synergy between this package and Consult. If you set consult-xref to be the show definitions functions, it will live preview your selected definition candidate (ie. show the file and definition location). Very cool!

(use-package dumb-jump
  :ensure t
  :custom
  (dumb-jump-prefer-searcher 'rg)
  ;; (xref-show-definitions-function #'xref-show-definitions-completing-read)
  (xref-show-definitions-function #'consult-xref)

  :config
  (add-hook 'xref-backend-functions #'dumb-jump-xref-activate))