Set lsp lookup handlers rather than remapping them
Now that the lookup module has beter deferred handler support.
This commit is contained in:
parent
90922caad0
commit
96ca04d488
2 changed files with 10 additions and 10 deletions
|
@ -5,8 +5,8 @@
|
|||
lsp-keep-workspace-alive nil)
|
||||
|
||||
(after! lsp-mode
|
||||
(define-key lsp-mode-map
|
||||
[remap +lookup/documentation] #'lsp-describe-thing-at-point)
|
||||
(set-lookup-handlers! 'lsp-mode :async t
|
||||
:documentation 'lsp-describe-thing-at-point)
|
||||
|
||||
;; Don't prompt to restart LSP servers while quitting Emacs
|
||||
(add-hook! 'kill-emacs-hook (setq lsp-restart 'ignore)))
|
||||
|
@ -20,13 +20,9 @@
|
|||
lsp-ui-doc-max-width 35
|
||||
lsp-ui-sideline-ignore-duplicate t)
|
||||
|
||||
(define-key! lsp-ui-mode-map
|
||||
[remap xref-find-definitions] #'lsp-ui-peek-find-definitions
|
||||
[remap xref-find-references] #'lsp-ui-peek-find-references
|
||||
;; `set-lookup-handlers!' won't work for lsp-ui-peek commands, because they
|
||||
;; don't switch buffers
|
||||
[remap +lookup/definition] #'lsp-ui-peek-find-definitions
|
||||
[remap +lookup/references] #'lsp-ui-peek-find-references))
|
||||
(set-lookup-handlers! 'lsp-ui-mode :async t
|
||||
:definition 'lsp-ui-peek-find-definitions
|
||||
:references 'lsp-ui-peek-find-references))
|
||||
|
||||
|
||||
(def-package! company-lsp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue