tools/lsp: replace lookup commands w/ lsp-ui-peek
This commit is contained in:
parent
0ea0486d5f
commit
e7e1383b08
1 changed files with 12 additions and 6 deletions
|
@ -4,8 +4,12 @@
|
||||||
lsp-auto-guess-root t
|
lsp-auto-guess-root t
|
||||||
lsp-keep-workspace-alive nil)
|
lsp-keep-workspace-alive nil)
|
||||||
|
|
||||||
|
(after! lsp-mode
|
||||||
|
(set-lookup-handlers! 'lsp-mode
|
||||||
|
:documentation #'lsp-describe-thing-at-point)
|
||||||
|
|
||||||
;; Don't prompt to restart LSP servers while quitting Emacs
|
;; Don't prompt to restart LSP servers while quitting Emacs
|
||||||
(add-hook! 'kill-emacs-hook (setq lsp-restart 'ignore))
|
(add-hook! 'kill-emacs-hook (setq lsp-restart 'ignore)))
|
||||||
|
|
||||||
|
|
||||||
(def-package! lsp-ui
|
(def-package! lsp-ui
|
||||||
|
@ -15,12 +19,14 @@
|
||||||
lsp-ui-doc-max-height 8
|
lsp-ui-doc-max-height 8
|
||||||
lsp-ui-doc-max-width 35
|
lsp-ui-doc-max-width 35
|
||||||
lsp-ui-sideline-ignore-duplicate t)
|
lsp-ui-sideline-ignore-duplicate t)
|
||||||
|
|
||||||
(define-key! lsp-ui-mode-map
|
(define-key! lsp-ui-mode-map
|
||||||
[remap xref-find-definitions] #'lsp-ui-peek-find-definitions
|
[remap xref-find-definitions] #'lsp-ui-peek-find-definitions
|
||||||
[remap xref-find-references] #'lsp-ui-peek-find-references)
|
[remap xref-find-references] #'lsp-ui-peek-find-references
|
||||||
(set-lookup-handlers! 'lsp-ui-mode
|
;; `set-lookup-handlers!' won't work for lsp-ui-peek commands, because they
|
||||||
:definition #'lsp-ui-peek-find-definitions
|
;; don't switch buffers
|
||||||
:references #'lsp-ui-peek-find-references))
|
[remap +lookup/definition] #'lsp-ui-peek-find-definitions
|
||||||
|
[remap +lookup/references] #'lsp-ui-peek-find-references))
|
||||||
|
|
||||||
|
|
||||||
(def-package! company-lsp
|
(def-package! company-lsp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue