From 50f1391e86e35542d60cfa0e42356ae49d86bad4 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 11 Aug 2020 21:08:57 -0400 Subject: [PATCH] Fix #3274: don't chain checkers to LSP Reverts 8ecec82 --- modules/tools/lsp/+lsp.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 9cd30bfa5..e89c44122 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -93,6 +93,16 @@ should be a deliberate act (as is flipping this variable).") (catch 'not-installed (apply orig-fn args))))) + (defadvice! +lsp--respect-user-defined-checkers-a (orig-fn &rest args) + "Set up flycheck-mode or flymake-mode, depending on `lsp-diagnostic-package'." + :around #'lsp-diagnostics--flycheck-enable + (if flycheck-checker + ;; Respect file/dir/explicit user-defined `flycheck-checker'. + (let ((old-checker flycheck-checker)) + (apply orig-fn args) + (setq-local flycheck-checker old-checker)) + (apply orig-fn args))) + (add-hook! 'lsp-mode-hook (defun +lsp-init-optimizations-h () "Increase `read-process-output-max' and `gcmh-high-cons-threshold'."