From bc7b3e5b65afd5ab47b5a1684abada1e0b72d009 Mon Sep 17 00:00:00 2001 From: tastytea Date: Thu, 3 Jun 2021 13:49:39 +0200 Subject: [PATCH] LSP: Don't show errors twice in modeline. --- init.d/programming/lsp.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/init.d/programming/lsp.el b/init.d/programming/lsp.el index 031887e..c0886b7 100644 --- a/init.d/programming/lsp.el +++ b/init.d/programming/lsp.el @@ -24,7 +24,8 @@ (lsp-keep-workspace-alive nil) (lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols)) - (lsp-bash-highlight-parsing-errors t)) + (lsp-bash-highlight-parsing-errors t) + (lsp-modeline-diagnostics-enable nil)) :custom-face ;; Semantic highlighting. TODO: Check later if better options are available. (lsp-face-semhl-variable ((t (:inherit font-lock-variable-name-face @@ -51,8 +52,9 @@ ;; Mark lsp-clients-clangd-args as safe to override. (put 'lsp-clients-clangd-args 'safe-local-variable #'consp) - (defun my/rebind-other-file-maybe () - "Rebind C-: to LSP equivalent." + (defun my/lsp-init () + "Change some settings after entering lsp-mode." + ;; Rebind C-: to LSP equivalent. (when (equal major-mode 'c++-mode) (bind-key "C-:" #'lsp-clangd-find-other-file 'c++-mode-map)))) :bind ("C-c C-f" . lsp-execute-code-action) @@ -65,7 +67,7 @@ (css-mode . lsp) (js-mode . lsp) (lsp-mode . lsp-enable-which-key-integration) - (lsp-mode . my/rebind-other-file-maybe) + (lsp-mode . my/lsp-init) (lsp-mode . my/company-prescient-sort-length-off))) ;; Eye-candy and flycheck support for lsp-mode.