diff --git a/modules/tools/flycheck/config.el b/modules/tools/flycheck/config.el index 7093a7f8c..9c73f5a00 100644 --- a/modules/tools/flycheck/config.el +++ b/modules/tools/flycheck/config.el @@ -12,8 +12,12 @@ errors.") :commands flycheck-list-errors flycheck-buffer :after-call doom-switch-buffer-hook after-find-file :config - ;; new-line checks are a mote excessive; idle checks are more than enough - (delq! 'new-line flycheck-check-syntax-automatically) + (setq flycheck-emacs-lisp-load-path 'inherit) + + ;; Check only when saving or opening files. Newline & idle checks are a mote + ;; excessive, especially when that can easily catch code in an incomplete + ;; state, so we removed them. + (setq flycheck-check-syntax-automatically '(save mode-enabled)) (add-hook! 'doom-escape-hook :append (defun +flycheck-buffer-h () @@ -22,14 +26,6 @@ errors.") (ignore-errors (flycheck-buffer)) nil))) - (add-hook! 'flycheck-after-syntax-check-hook - (defun +flycheck-adjust-syntax-check-eagerness-h () - "Check for errors less often when there aren't any. -Done to reduce the load flycheck imposes on the current buffer." - (if flycheck-current-errors - (kill-local-variable 'flycheck-idle-change-delay) - (setq-local flycheck-idle-change-delay +flycheck-lazy-idle-delay)))) - (global-flycheck-mode +1))