Enable flyspell-c++-clang-tidy only for saved files.
This commit is contained in:
parent
1d254e7908
commit
0f19b47daf
22
init.el
22
init.el
|
@ -1,5 +1,5 @@
|
|||
;;; init.el --- tastytea's Emacs init file.
|
||||
;; Time-stamp: <2019-09-24T23:38:28+00:00>
|
||||
;; Time-stamp: <2019-09-25T00:18:15+00:00>
|
||||
|
||||
;;; Commentary:
|
||||
;; I am using this file with Emacs 26, but most of it will probably work with
|
||||
|
@ -216,20 +216,34 @@ With argument, do this that many times."
|
|||
;; Syntax checking with many plugins.
|
||||
(unless slow-computer
|
||||
(use-package flycheck
|
||||
:defer nil
|
||||
:config
|
||||
(global-flycheck-mode)
|
||||
(setq flycheck-check-syntax-automatically '(save new-line mode-change))
|
||||
;; (setq flycheck-check-syntax-automatically '(save new-line mode-change))
|
||||
(flycheck-add-mode 'html-tidy 'web-mode)
|
||||
(flycheck-add-mode 'css-csslint 'web-mode)
|
||||
:bind
|
||||
("<f5>" . flycheck-previous-error)
|
||||
("<f6>" . flycheck-next-error))
|
||||
("<f6>" . flycheck-next-error)
|
||||
)
|
||||
|
||||
(use-package flycheck-clang-tidy
|
||||
:after (flycheck projectile)
|
||||
:if (executable-find "clang-tidy")
|
||||
:config
|
||||
(defun my/clang-tidy-off ()
|
||||
"Disable c++-clang-tidy."
|
||||
(add-to-list 'flycheck-disabled-checkers 'c/c++-clang-tidy))
|
||||
(defun my/clang-tidy-on ()
|
||||
"Enable c++-clang-tidy on."
|
||||
(setq-local flycheck-disabled-checkers
|
||||
(remove 'c/c++-clang-tidy flycheck-disabled-checkers))
|
||||
)
|
||||
:hook
|
||||
(flycheck-mode . flycheck-clang-tidy-setup))
|
||||
(flycheck-mode . flycheck-clang-tidy-setup)
|
||||
(first-change . my/clang-tidy-off) ; Disable when file is modified.
|
||||
(before-save . my/clang-tidy-on) ; Enable if file is saved.
|
||||
)
|
||||
)
|
||||
|
||||
;; Autocompletion mode with many plugins.
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
127.0.0.1:51313 25947
|
||||
127.0.0.1:51313 12357
|
||||
phahw2ohVoh0oopheish7IVie9desh8aequeenei3uo8wahShe%thuadaeNa4ieh
|
Loading…
Reference in New Issue
Block a user