Remap xref-pop-marker-stack -> better-jumper
Better to have only one jumplist system. Also remaps xref-find-* commands to +lookup commands earlier in the startup process.
This commit is contained in:
parent
57a5137b4b
commit
0b28480a21
2 changed files with 6 additions and 5 deletions
|
@ -197,6 +197,7 @@ savehist file."
|
|||
:init
|
||||
(global-set-key [remap evil-jump-forward] #'better-jumper-jump-forward)
|
||||
(global-set-key [remap evil-jump-backward] #'better-jumper-jump-backward)
|
||||
(global-set-key [remap xref-pop-marker-stack] #'better-jumper-jump-backward)
|
||||
:config
|
||||
(better-jumper-mode +1)
|
||||
(add-hook 'better-jumper-post-jump-hook #'recenter)
|
||||
|
|
|
@ -98,6 +98,11 @@ this list.")
|
|||
;;
|
||||
;;; xref
|
||||
|
||||
;; The lookup commands are superior, and will consult xref if there are no
|
||||
;; better backends available.
|
||||
(global-set-key [remap xref-find-definitions] #'+lookup/definition)
|
||||
(global-set-key [remap xref-find-references] #'+lookup/references)
|
||||
|
||||
(after! xref
|
||||
;; We already have `projectile-find-tag' and `evil-jump-to-tag', no need for
|
||||
;; xref to be one too.
|
||||
|
@ -108,11 +113,6 @@ this list.")
|
|||
(funcall orig-fn)))
|
||||
(advice-add #'projectile-find-tag :around #'+lookup*projectile-find-tag)
|
||||
|
||||
;; The lookup commands are superior, and will consult xref if there are no
|
||||
;; better backends available.
|
||||
(global-set-key [remap xref-find-definitions] #'+lookup/definition)
|
||||
(global-set-key [remap xref-find-references] #'+lookup/references)
|
||||
|
||||
;; Use `better-jumper' instead of xref's marker stack
|
||||
(advice-add #'xref-push-marker-stack :around #'doom*set-jump)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue