tools/lsp: restore flycheck-checker fix #3989

Removed in 22b6eaed0.
This commit is contained in:
Henrik Lissner 2020-10-11 19:44:00 -04:00
parent 22b6eaed03
commit ebc1e7092d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -52,6 +52,15 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
:type-definition #'lsp-find-type-definition
:references #'lsp-find-references)
(defadvice! +lsp--respect-user-defined-checkers-a (orig-fn &rest args)
"Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'."
:around #'lsp-diagnostics--flycheck-enable
(if 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-display-guessed-project-root-h ()
"Log what LSP things is the root of the current project."