Properly lazy load flyspell
Package was eagerly loaded at startup, so we must pretend it hasn't to defer it and future configuration. And generalize defer-feature! macro.
This commit is contained in:
parent
85883facf5
commit
5b8b04f0c8
2 changed files with 21 additions and 9 deletions
|
@ -46,6 +46,13 @@
|
|||
;; messages for every word when checking the entire buffer
|
||||
flyspell-issue-message-flag nil)
|
||||
|
||||
(use-package! flyspell ; built-in
|
||||
:defer t
|
||||
:preface
|
||||
;; `flyspell' is loaded at startup. In order to lazy load its config we need
|
||||
;; to pretend it isn't loaded.
|
||||
(defer-feature! flyspell flyspell-mode flyspell-prog-mode)
|
||||
:init
|
||||
(add-hook! '(org-mode-hook
|
||||
markdown-mode-hook
|
||||
TeX-mode-hook
|
||||
|
@ -61,6 +68,12 @@
|
|||
prog-mode-hook)
|
||||
#'flyspell-prog-mode))
|
||||
|
||||
:config
|
||||
(setq flyspell-issue-welcome-flag nil
|
||||
;; Significantly speeds up flyspell, which would otherwise print
|
||||
;; messages for every word when checking the entire buffer
|
||||
flyspell-issue-message-flag nil)
|
||||
|
||||
(add-hook! 'flyspell-mode-hook
|
||||
(defun +spell-inhibit-duplicate-detection-maybe-h ()
|
||||
"Don't mark duplicates when style/grammar linters are present.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue