From d21099cbd05c1ba1571ec8ecaf30639560599de5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 17 Apr 2020 14:56:02 -0400 Subject: [PATCH] Flycheck buffer on idle-buffer-switch --- modules/checkers/syntax/config.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/checkers/syntax/config.el b/modules/checkers/syntax/config.el index 6d82bb0f5..f6c52c0a1 100644 --- a/modules/checkers/syntax/config.el +++ b/modules/checkers/syntax/config.el @@ -12,7 +12,12 @@ ;; Check only when saving or opening files. Newline & idle checks are a mote ;; excessive and can catch code in an incomplete state, producing false ;; positives, so we removed them. - (setq flycheck-check-syntax-automatically '(save mode-enabled)) + (setq flycheck-check-syntax-automatically '(save mode-enabled idle-buffer-switch)) + + ;; For the above functionality, check syntax in a buffer that you switched to + ;; only briefly. This allows "refreshing" the syntax check state for several + ;; buffers quickly after e.g. changing a config file. + (setq flycheck-buffer-switch-check-intermediate-buffers t) ;; Display errors a little quicker (default is 0.9s) (setq flycheck-display-errors-delay 0.25)