2025-12-22 19:51:38 +11:00
|
|
|
;; -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
|
|
(use-package flycheck
|
|
|
|
|
:hook (emacs-startup . global-flycheck-mode)
|
|
|
|
|
:config
|
|
|
|
|
(setq flycheck-emacs-lisp-load-path 'inherit)
|
|
|
|
|
|
|
|
|
|
;; Rerunning checks on every newline is a mote excessive.
|
|
|
|
|
(delq 'new-line flycheck-check-syntax-automatically)
|
2025-12-23 07:34:32 +11:00
|
|
|
|
|
|
|
|
(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
|
2025-12-22 19:51:38 +11:00
|
|
|
;; And don't recheck on idle as often
|
2025-12-23 07:34:32 +11:00
|
|
|
(setq flycheck-idle-change-delay 1.0
|
2025-12-22 19:51:38 +11:00
|
|
|
|
2025-12-23 07:34:32 +11:00
|
|
|
;; 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.
|
|
|
|
|
flycheck-buffer-switch-check-intermediate-buffers t
|
2025-12-22 19:51:38 +11:00
|
|
|
|
2025-12-23 07:34:32 +11:00
|
|
|
;; Display errors a little quicker (default is 0.9s)
|
|
|
|
|
flycheck-display-errors-delay 0.25))
|
2025-12-22 19:51:38 +11:00
|
|
|
|
|
|
|
|
(use-package flyover
|
|
|
|
|
:diminish
|
2026-02-02 00:04:11 +11:00
|
|
|
:hook prog-mode
|
|
|
|
|
:config
|
|
|
|
|
;; Disable flyover-mode in emacs-lisp-mode
|
|
|
|
|
(add-hook 'emacs-lisp-mode-hook (lambda () (flyover-mode -1)))
|
2025-12-22 19:51:38 +11:00
|
|
|
:custom (flyover-checkers '(flycheck)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(provide 'init-check)
|