summary refs log tree commit diff stats
path: root/user/emacs
diff options
context:
space:
mode:
authorAlan Pearce2019-11-15 16:47:20 +0100
committerAlan Pearce2019-11-15 16:49:21 +0100
commit80f19b76f458c6661aff97c7ae96e05c5eaee60d (patch)
treeea9e0a515f2edfe866e2d2cddeb61e012b100678 /user/emacs
parentebec58c9ebf9e99fca1f389bad50581e3a10cb9e (diff)
downloadnixfiles-80f19b76f458c6661aff97c7ae96e05c5eaee60d.tar.lz
nixfiles-80f19b76f458c6661aff97c7ae96e05c5eaee60d.tar.zst
nixfiles-80f19b76f458c6661aff97c7ae96e05c5eaee60d.zip
Emacs: enable progressively-nicer goto-{def,ref} commands
Diffstat (limited to 'user/emacs')
-rw-r--r--user/emacs/.emacs.d/init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/user/emacs/.emacs.d/init.el b/user/emacs/.emacs.d/init.el
index 40ae6de6..4aee1385 100644
--- a/user/emacs/.emacs.d/init.el
+++ b/user/emacs/.emacs.d/init.el
@@ -762,6 +762,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
               :info-list-face 'flycheck-error-list-info)))
 
 (use-package lsp-mode
+  :general (:states 'normal :keymaps 'lsp-mode-map
+                    "gd" #'xref-find-definitions
+                    "gr" #'xref-find-references
+                    "C-t" #'xref-pop-marker-stack)
   :ghook ('(typescript-mode-hook
             dockerfile-mode-hook
             yaml-mode-hook
@@ -784,6 +788,10 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
 (use-package lsp-ui
   :after lsp-mode
   :ghook ('lsp-mode-hook)
+  :general (:states 'normal :keymaps 'lsp-ui-mode-map
+                    "gd" #'lsp-ui-peek-find-definitions
+                    "gr" #'lsp-ui-peek-find-references
+                    "C-t" #'lsp-ui-peek-jump-backward)
   :config (progn
             (setq-default lsp-ui-doc-mode nil))
   :custom ((lsp-ui-sideline-enable t)