tools/lsp: Make lsp checker chained to other checkers
This commit is contained in:
parent
aec94f5bb2
commit
8ecec82eef
1 changed files with 8 additions and 6 deletions
|
@ -119,12 +119,14 @@ This also logs the resolved project root, if found, so we know where we are."
|
||||||
((or :flymake 't)
|
((or :flymake 't)
|
||||||
(lsp--flymake-setup))
|
(lsp--flymake-setup))
|
||||||
(:flycheck
|
(:flycheck
|
||||||
(let ((old-checker flycheck-checker))
|
;; Ensure file/dir local `flycheck-checker' is respected
|
||||||
(lsp-flycheck-enable)
|
(unless flycheck-checker
|
||||||
;; Ensure file/dir local `flycheck-checker' is respected
|
(if (flycheck-checker-supports-major-mode-p 'lsp major-mode)
|
||||||
(when old-checker
|
(lsp-flycheck-enable)
|
||||||
(setq-local flycheck-checker old-checker)
|
(let ((old-checker (flycheck-get-checker-for-buffer)))
|
||||||
(kill-local-variable 'flycheck-check-syntax-automatically)))))))
|
(lsp-flycheck-enable)
|
||||||
|
(flycheck-add-next-checker 'lsp old-checker)))
|
||||||
|
(kill-local-variable 'flycheck-checker))))))
|
||||||
|
|
||||||
(defvar +lsp--deferred-shutdown-timer nil)
|
(defvar +lsp--deferred-shutdown-timer nil)
|
||||||
(defadvice! +lsp-defer-server-shutdown-a (orig-fn &optional restart)
|
(defadvice! +lsp-defer-server-shutdown-a (orig-fn &optional restart)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue