From 7f394ccfe02eed90e902bfcd28e825a7f735c164 Mon Sep 17 00:00:00 2001 From: David Morgan Date: Thu, 4 Aug 2022 12:24:22 +0100 Subject: Workround lsp-mode including declarations in xrefs --- .emacs.d/lisp/init-lsp.el | 4 ++++ 1 file changed, 4 insertions(+) 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")) -- cgit 1.4.1-2-gfad0