From 69bd3da19505bbb7b70ac875c16de0edf7f55849 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 18 May 2021 01:05:35 -0400 Subject: [PATCH] Don't enable lsp-ui-mode in lsp--auto-configure Using a hook instead is more sensible (users can trivially configure it). --- modules/tools/lsp/+lsp.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 55eabc5fb98..2054c6bc438 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -157,6 +157,14 @@ server getting expensively restarted when reverting buffers." (use-package! lsp-ui :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 (when (featurep! +peek) (set-lookup-handlers! 'lsp-ui-mode