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
This commit is contained in:
Henrik Lissner 2021-03-05 18:43:56 -05:00
parent 0a9172a8f2
commit 430d628b00

View file

@ -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'."