feat(lsp): use flymake when enabled

This commit is contained in:
Jeetaditya Chatterjee
2022-08-16 20:12:45 +01:00
parent 1cae082d66
commit b957142e3e
3 changed files with 16 additions and 2 deletions

View File

@@ -34,6 +34,11 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
;; Make breadcrumbs opt-in; they're redundant with the modeline and imenu
(setq lsp-headerline-breadcrumb-enable nil)
;; Explicitly tell lsp to use flymake; Lsp will default to flycheck if found
;; even if its a dependency
(when (modulep! :checkers syntax +flymake)
(setq lsp-diagnostics-provider :flymake))
;; Let doom bind the lsp keymap.
(when (modulep! :config default +bindings)
(setq lsp-keymap-prefix nil))
@@ -67,6 +72,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
:implementations '(lsp-find-implementation :async t)
:type-definition #'lsp-find-type-definition)
(defadvice! +lsp--respect-user-defined-checkers-a (fn &rest args)
"Ensure user-defined `flycheck-checker' isn't overwritten by `lsp'."
:around #'lsp-diagnostics-flycheck-enable