Don't enable lsp-ui-mode in lsp--auto-configure

Using a hook instead is more sensible (users can trivially configure
it).
This commit is contained in:
Henrik Lissner 2021-05-18 01:05:35 -04:00
parent d141f39ee7
commit 69bd3da195

View file

@ -157,6 +157,14 @@ server getting expensively restarted when reverting buffers."
(use-package! lsp-ui (use-package! lsp-ui
:hook (lsp-mode . lsp-ui-mode) :hook (lsp-mode . lsp-ui-mode)
:init
(defadvice! +lsp--use-hook-instead-a (orig-fn &rest args)
"Change `lsp--auto-configure' to not force `lsp-ui-mode' on us. Using a hook
instead is more sensible."
:around #'lsp--auto-configure
(letf! ((#'lsp-ui-mode #'ignore))
(apply orig-fn args)))
:config :config
(when (featurep! +peek) (when (featurep! +peek)
(set-lookup-handlers! 'lsp-ui-mode (set-lookup-handlers! 'lsp-ui-mode