From 6563e89bda8b09ef9dcb40fdfe461a5514addc22 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sat, 17 Apr 2021 07:58:50 +0800 Subject: [PATCH 1/2] Indicate that lsp-describe-thing-at-point is async - otherwise, `+lookup-online-backend-fn` would be called as well - lsp-describe-thing-at-point was marked as not async in https://github.com/hlissner/doom-emacs/commit/d4eb7e31ac25107a35f9de567a497d9100fcc1ff - but `lsp-describe-thing-at-point` calls `lsp--make-request` internally (which is async I assume): https://github.com/emacs-lsp/lsp-mode/blob/eda51c21662253fd05b4f3f20ad7b029d9c2aff7/lsp-mode.el#L4677 --- modules/tools/lsp/+lsp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 25184aecd..7f43491b4 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -58,7 +58,7 @@ about it (it will be logged to *Messages* however).") (set-lookup-handlers! 'lsp-mode :definition #'+lsp-lookup-definition-handler :references #'+lsp-lookup-references-handler - :documentation #'lsp-describe-thing-at-point + :documentation '(lsp-describe-thing-at-point :async t) :implementations #'lsp-find-implementation :type-definition #'lsp-find-type-definition) From 00de463d1061ec9e9ff15a45ce35c348f10135f2 Mon Sep 17 00:00:00 2001 From: Yiming Chen Date: Sat, 17 Apr 2021 08:54:50 +0800 Subject: [PATCH 2/2] Indicate that lsp-find-implementation is async as well - this fixes an issue that when there are multiple implementations, jump to one implementation that's in another file fails --- modules/tools/lsp/+lsp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 7f43491b4..8548243a7 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -59,7 +59,7 @@ about it (it will be logged to *Messages* however).") :definition #'+lsp-lookup-definition-handler :references #'+lsp-lookup-references-handler :documentation '(lsp-describe-thing-at-point :async t) - :implementations #'lsp-find-implementation + :implementations '(lsp-find-implementation :async t) :type-definition #'lsp-find-type-definition) (defadvice! +lsp--respect-user-defined-checkers-a (orig-fn &rest args)