feature/{syntax-checker,spellcheck} -> tools/fly{check,spell}
This commit is contained in:
parent
88f50bbdec
commit
69ed1a4a99
46 changed files with 147 additions and 110 deletions
45
modules/tools/flycheck/config.el
Normal file
45
modules/tools/flycheck/config.el
Normal file
|
@ -0,0 +1,45 @@
|
|||
;;; tools/flycheck/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +flycheck-on-escape t
|
||||
"If non-nil, flycheck will recheck the current buffer when pressing ESC/C-g.")
|
||||
|
||||
|
||||
;;
|
||||
;; Packages
|
||||
|
||||
(def-package! flycheck
|
||||
:commands (flycheck-list-errors flycheck-buffer)
|
||||
:after-call (doom-enter-buffer-hook after-find-file)
|
||||
:config
|
||||
;; Emacs feels snappier without checks on newline
|
||||
(setq flycheck-check-syntax-automatically (delq 'new-line flycheck-check-syntax-automatically))
|
||||
|
||||
(defun +flycheck|buffer ()
|
||||
"Flycheck buffer on ESC in normal mode."
|
||||
(when (and flycheck-mode +flycheck-on-escape)
|
||||
(ignore-errors (flycheck-buffer))
|
||||
nil))
|
||||
(add-hook 'doom-escape-hook #'+flycheck|buffer t)
|
||||
|
||||
(after! evil
|
||||
(setq-hook! 'evil-insert-state-entry-hook
|
||||
flycheck-idle-change-delay 1.75)
|
||||
(setq-hook! 'evil-insert-state-exit-hook
|
||||
flycheck-idle-change-delay (default-value 'flycheck-idle-change-delay)))
|
||||
|
||||
(global-flycheck-mode +1))
|
||||
|
||||
|
||||
(def-package! flycheck-popup-tip
|
||||
:commands (flycheck-popup-tip-show-popup flycheck-popup-tip-delete-popup)
|
||||
:init (add-hook 'flycheck-mode-hook #'+flycheck-popup-mode)
|
||||
:config (setq flycheck-popup-tip-error-prefix "✕ "))
|
||||
|
||||
|
||||
(def-package! flycheck-posframe
|
||||
:when (and EMACS26+ (featurep! +childframe))
|
||||
:commands flycheck-posframe-show-posframe
|
||||
:config
|
||||
(setq flycheck-posframe-warning-prefix "⚠ "
|
||||
flycheck-posframe-info-prefix "··· "
|
||||
flycheck-posframe-error-prefix "✕ "))
|
Loading…
Add table
Add a link
Reference in a new issue