Restore xref embark actions being the default only in prog modes

This commit is contained in:
Jeremy Dormitzer 2024-04-23 11:38:30 -04:00
parent 071aa788c8
commit d6fdb649ce

View File

@ -62,6 +62,11 @@
;; Embark adds context actions to completion candidates (and other things!)
(use-package embark
:config
;; Put xref targets at the top of the list in programming modes
(defun embark-prod-mode-hook ()
(setq-local embark-target-finders (remove #'embark-target-identifier-at-point embark-target-finders))
(add-to-list 'embark-target-finders #'embark-target-identifier-at-point))
(add-hook 'prog-mode-hook #'embark-prod-mode-hook)
(defun embark-which-key-indicator ()
"An embark indicator that displays keymaps using which-key.
The which-key help message will show the type and value of the