From d40e5dff4ed80753db9e2913b4a55698229ca096 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Mar 2020 16:33:17 -0400 Subject: [PATCH] Make a few LSP features opt-in For the sake of speed and reliability. Support for some of these features are poorly implemented in some servers, and many are redundant with mechanisms already available in Emacs/Doom. --- modules/tools/lsp/config.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 29a301e9f..f665104fd 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -16,6 +16,7 @@ excluded servers' identifiers to `+lsp-capf-blacklist'.") "Language servers listed here will always use the `company-lsp' backend, irrespective of what `+lsp-company-backend' is set to.") + ;; ;;; Packages @@ -36,6 +37,18 @@ irrespective of what `+lsp-company-backend' is set to.") lsp-groovy-server-install-dir (concat lsp-server-install-dir "lsp-groovy/") lsp-intelephense-storage-path (concat doom-cache-dir "lsp-intelephense/")) + ;; Disable LSP's superfluous, expensive and/or debatably unnecessary features. + ;; Some servers implement these poorly. Better to just rely on Emacs' native + ;; mechanisms and make these opt-in. + (setq lsp-enable-folding nil + ;; Potentially slow + lsp-enable-file-watchers nil + lsp-enable-text-document-color nil + lsp-enable-semantic-highlighting nil + ;; Don't modify our code without our permission + lsp-enable-indentation nil + lsp-enable-on-type-formatting nil) + :config (set-lookup-handlers! 'lsp-mode :async t :documentation #'lsp-describe-thing-at-point