Improve flyspell support
+ Make flyspell more selective about what to scan in markdown buffers. + Don't mark duplicates when proseline or langtool are present. + Add set-flyspell-predicate! for seeing mode-specific word predicates.
This commit is contained in:
parent
d83ba452ef
commit
db2949ff32
4 changed files with 57 additions and 6 deletions
16
modules/tools/flyspell/autoload.el
Normal file
16
modules/tools/flyspell/autoload.el
Normal file
|
@ -0,0 +1,16 @@
|
|||
;;; tools/flyspell/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +flyspell--predicate-alist nil
|
||||
"TODO")
|
||||
|
||||
;;;###autodef
|
||||
(defun set-flyspell-predicate! (modes predicate)
|
||||
"TODO"
|
||||
(dolist (mode (doom-enlist modes) +flyspell--predicate-alist)
|
||||
(add-to-list '+flyspell--predicate-alist (cons mode predicate))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +flyspell|init-predicate ()
|
||||
"TODO"
|
||||
(when-let* ((pred (assq major-mode +flyspell--predicate-alist)))
|
||||
(setq-local flyspell-generic-check-word-predicate (cdr pred))))
|
Loading…
Add table
Add a link
Reference in a new issue