From ee4c9c351f73749d3cd8aa57f0c979ab51352ebd Mon Sep 17 00:00:00 2001 From: kj Date: Mon, 27 Jun 2022 16:02:41 -0400 Subject: [PATCH] LSP improvements. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Disconnect from flycheck: I finded that it hangs with lsp (checked with profiler-start/stop/report) and freeze emacs for a few seconsand other errors apears like bad syntax highlighting. - Re-enable lsp with prog-mode. - Enable automatic project root detection vía projectile (lsp-auto-guess-root). - Lsp idle delay changed to 0.5 (default value). --- configs/base-lsp.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/configs/base-lsp.el b/configs/base-lsp.el index ad4a070..9a2eeb3 100644 --- a/configs/base-lsp.el +++ b/configs/base-lsp.el @@ -20,9 +20,10 @@ lsp-format-buffer lsp-organize-imports lsp-install-server) - :hook ((markdown-mode . lsp-deferred) - (js-mode . lsp-deferred) - (php-mode . lsp-deferred) + :hook ((prog-mode . (lambda () + (unless (derived-mode-p 'emacs-lisp-mode 'lisp-mode 'makefile-mode) + (lsp-deferred)))) + (markdown-mode . lsp-deferred) (lsp-mode . lsp-enable-which-key-integration)) :custom (lsp-headerline-breadcrumb-enable nil) @@ -39,9 +40,11 @@ lsp-enable-symbol-highlighting nil lsp-enable-text-document-color nil lsp-lens-enable nil + lsp-auto-guess-root t lsp-log-io nil - lsp-idle-delay 1 + lsp-idle-delay 0.5 + lsp-diagnostic-package :none ; Evitar que lsp conecte con flycheck para evitar que se congele lsp-enable-indentation nil lsp-enable-on-type-formatting nil)