about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-08-04 12:24:22 +0100
committerDavid Morgan <djm_uk@protonmail.com>2022-08-04 12:24:22 +0100
commit7f394ccfe02eed90e902bfcd28e825a7f735c164 (patch)
treefae0a00ec02774ca76461b6af34411de5baa1732
parent6567bdbde92af863d2bd6717a7ac618b47b33eb5 (diff)
downloaddotfiles-7f394ccfe02eed90e902bfcd28e825a7f735c164.tar.gz
Workround lsp-mode including declarations in xrefs
-rw-r--r--.emacs.d/lisp/init-lsp.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-lsp.el b/.emacs.d/lisp/init-lsp.el
index 75b98cf..fff9045 100644
--- a/.emacs.d/lisp/init-lsp.el
+++ b/.emacs.d/lisp/init-lsp.el
@@ -32,6 +32,10 @@
   (defun my/lsp-mode-setup-completion ()
     (setf (alist-get 'styles (alist-get 'lsp-capf completion-category-defaults))
           '(orderless)))
+  (defun lsp--make-reference-params-exclude-declaration (orig &optional td-position exclude-declaration)
+    (funcall orig td-position t))
+
+  (advice-add 'lsp--make-reference-params :around 'lsp--make-reference-params-exclude-declaration)
   (if (eq system-type 'darwin)
       (setq lsp-keymap-prefix "s-l")
     (setq lsp-keymap-prefix "C-c C-l"))