feature/spellcheck: auto-check buffer on flycheck-mode

This commit is contained in:
Henrik Lissner
2018-01-16 01:55:06 -05:00
parent 45c2221316
commit 3ff85f6f37

View File

@ -5,7 +5,13 @@
:config :config
(setq ispell-program-name (executable-find "aspell") (setq ispell-program-name (executable-find "aspell")
ispell-list-command "--list" ispell-list-command "--list"
ispell-extr-args '("--dont-tex-check-comments"))) ispell-extr-args '("--dont-tex-check-comments"))
(defun +spellcheck|automatically ()
"Spellcheck the buffer when `flyspell-mode' is enabled."
(when flyspell-mode
(flyspell-buffer)))
(add-hook 'flyspell-mode-hook #'+spellcheck|automatically))
(def-package! flyspell-correct (def-package! flyspell-correct