Doom Emacs, Hunspell, and MacOS
Doom Emacs uses spell-fu as the default highlighter for spellchecking. spell-fu can use several options like aspell, hunspell, enchant, etc. for the actual spellchecking. I prefer to use Hunspell.
The process to install and configure hunspell to work for Doom Emacs is simple:
- Use homebrew to install
hunspell:
$ brew install hunspell
hunspelldoesn’t install dictionaries. Download them from the aspell webpage and store them in~/Library/Spelling. Check thathunspellis recognizing your dictionaries.
$ hunspell -D
- Tell Doom Emacs you are using
hunspellin yourinit.elfile:
(...)
:checkers
(spell +hunspell) ; tasing you for misspelling mispelling
-
While Doom will take care of telling Emacs which spell checker you are using, you need to specify a default dictionary. Otherwise you will go crazy wondering why
spell-fuis marking every word in your documents as incorrect. (This applies not only forhunspellbut also foraspellandenchant.)You can get a list of valid dictionary names by changing the dictionary manually within Emacs, i.e.
M-xispell-change-dictionary.
(setq ispell-dictionary "english")