Merge pull request #3841 from Ban3/enchant-spell
checkers/spell: add support for using enchant
This commit is contained in:
commit
4d42347032
3 changed files with 39 additions and 16 deletions
|
@ -16,15 +16,17 @@
|
|||
'("#\\+BEGIN_SRC" . "#\\+END_SRC")
|
||||
'("#\\+BEGIN_EXAMPLE" . "#\\+END_EXAMPLE"))
|
||||
|
||||
;; Enable either aspell or hunspell.
|
||||
;; If no module flags are given, enable either aspell or hunspell if their
|
||||
;; binary is found.
|
||||
;; If one of the flags `+aspell' or `+hunspell' is given, only enable that
|
||||
;; spell checker.
|
||||
;; Enable either aspell, hunspell or enchant.
|
||||
;; If no module flags are given, enable either aspell, hunspell or enchant
|
||||
;; if their binary is found.
|
||||
;; If one of the flags `+aspell', `+hunspell' or `+enchant' is given,
|
||||
;; only enable that spell checker.
|
||||
(pcase (cond ((featurep! +aspell) 'aspell)
|
||||
((featurep! +hunspell) 'hunspell)
|
||||
((executable-find "aspell") 'aspell)
|
||||
((executable-find "hunspell") 'hunspell))
|
||||
((featurep! +enchant) 'enchant)
|
||||
((executable-find "aspell") 'aspell)
|
||||
((executable-find "hunspell") 'hunspell)
|
||||
((executable-find "enchant-2") 'enchant))
|
||||
(`aspell
|
||||
(setq ispell-program-name "aspell"
|
||||
ispell-extra-args '("--sug-mode=ultra"
|
||||
|
@ -58,7 +60,10 @@
|
|||
(`hunspell
|
||||
(setq ispell-program-name "hunspell"))
|
||||
|
||||
(_ (doom-log "Spell checker not found. Either install `aspell' or `hunspell'"))))
|
||||
(`enchant
|
||||
(setq ispell-program-name "enchant-2"))
|
||||
|
||||
(_ (doom-log "Spell checker not found. Either install `aspell', `hunspell' or `enchant'"))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue