tools/lsp: enable flymake or flycheck, not both
And only enable flycheck if it is installed.
This commit is contained in:
parent
3f7e0fd103
commit
9026efcf5a
1 changed files with 7 additions and 6 deletions
|
@ -35,12 +35,13 @@ This can be a single company backend or a list thereof. It can be anything
|
||||||
(add-hook! 'lsp-ui-mode-hook
|
(add-hook! 'lsp-ui-mode-hook
|
||||||
(defun +lsp-init-ui-flycheck-or-flymake-h ()
|
(defun +lsp-init-ui-flycheck-or-flymake-h ()
|
||||||
"Sets up flymake-mode or flycheck-mode, depending on `lsp-prefer-flymake'."
|
"Sets up flymake-mode or flycheck-mode, depending on `lsp-prefer-flymake'."
|
||||||
(unless (eq :none lsp-prefer-flymake)
|
(cond ((eq :none lsp-prefer-flymake))
|
||||||
(if (and (not (version< emacs-version "26.1"))
|
((and (not (version< emacs-version "26.1"))
|
||||||
lsp-prefer-flymake)
|
lsp-prefer-flymake)
|
||||||
(lsp--flymake-setup))
|
(lsp--flymake-setup))
|
||||||
|
((require 'flycheck nil t)
|
||||||
(require 'lsp-ui-flycheck)
|
(require 'lsp-ui-flycheck)
|
||||||
(lsp-ui-flycheck-enable t))))
|
(lsp-ui-flycheck-enable t)))))
|
||||||
:config
|
:config
|
||||||
(setq lsp-prefer-flymake nil
|
(setq lsp-prefer-flymake nil
|
||||||
lsp-ui-doc-max-height 8
|
lsp-ui-doc-max-height 8
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue