Only add clang-tidy once as next-checker to lsp-ui.

This commit is contained in:
tastytea 2019-10-11 13:09:38 +02:00
parent a13b44ae9a
commit 1649154998
1 changed files with 3 additions and 2 deletions

View File

@ -252,8 +252,9 @@ With argument, do this that many times."
(flycheck-clang-tidy-setup)
;; Run clang-tidy after the lsp-ui checker.
(when lsp-mode
(flycheck-add-next-checker 'lsp-ui '(warning . c/c++-clang-tidy)))
)
(unless (equal (flycheck-get-next-checker-for-buffer 'lsp-ui)
'c/c++-clang-tidy)
(flycheck-add-next-checker 'lsp-ui '(warning . c/c++-clang-tidy)))))
:hook
(flycheck-mode . my/flycheck-clang-tidy-setup)
(first-change . my/clang-tidy-off) ; Disable when file is modified.