tools/lsp: remove unneeded lsp-ui-*-enable checks
This commit is contained in:
parent
0196875d9c
commit
d141f39ee7
1 changed files with 2 additions and 13 deletions
|
@ -157,26 +157,15 @@ server getting expensively restarted when reverting buffers."
|
|||
|
||||
(use-package! lsp-ui
|
||||
:hook (lsp-mode . lsp-ui-mode)
|
||||
:hook (lsp-ui . lsp-ui-sideline-mode)
|
||||
:hook (lsp-ui . lsp-ui-doc-mode)
|
||||
:config
|
||||
;; For some reason `lsp-ui' doesn't actually use the `lsp-ui-doc-enable' and
|
||||
;; `lsp-ui-sideline-enable' variables, so we fix that.
|
||||
(defadvice! +lsp--ui-doc-only-if-enabled-a (&rest _)
|
||||
:before-while #'lsp-ui-doc-mode
|
||||
lsp-ui-doc-enable)
|
||||
|
||||
(defadvice! +lsp--ui-sideline-only-if-enabled-a (&rest _)
|
||||
:before-while 'lsp-ui-sideline-mode
|
||||
lsp-ui-sideline-enable)
|
||||
|
||||
(when (featurep! +peek)
|
||||
(set-lookup-handlers! 'lsp-ui-mode
|
||||
:definition 'lsp-ui-peek-find-definitions
|
||||
:implementations 'lsp-ui-peek-find-implementation
|
||||
:references 'lsp-ui-peek-find-references))
|
||||
|
||||
(setq lsp-ui-doc-max-height 8
|
||||
(setq lsp-ui-peek-enable (featurep! +peek)
|
||||
lsp-ui-doc-max-height 8
|
||||
lsp-ui-doc-max-width 35
|
||||
lsp-ui-doc-show-with-mouse nil ; don't disappear on mouseover
|
||||
lsp-ui-doc-position 'at-point
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue