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)