From 430d628b009dbba566df71841a45d67cd732ab52 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 5 Mar 2021 18:43:56 -0500 Subject: [PATCH] tools/lsp: use xref backend as lookup handler If lsp-find-{definition,references} fails, it will properly fall through to other lookup handlers (like dumb-jump). Fix #4662 Fix #4739 --- modules/tools/lsp/+lsp.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 7f723c992..3a968a244 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -57,11 +57,11 @@ about it (it will be logged to *Messages* however).") (set-popup-rule! "^\\*lsp-help" :size 0.35 :quit t :select t) (set-lookup-handlers! 'lsp-mode :async t + ;; NOTE :definitions and :references aren't needed. LSP is integrated into + ;; xref, which the lookup module has first class support for. :documentation #'lsp-describe-thing-at-point - :definition #'lsp-find-definition :implementations #'lsp-find-implementation - :type-definition #'lsp-find-type-definition - :references #'lsp-find-references) + :type-definition #'lsp-find-type-definition) (defadvice! +lsp--respect-user-defined-checkers-a (orig-fn &rest args) "Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'."