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:

$ brew install hunspell
  • hunspell doesn’t install dictionaries. Download them from the aspell webpage and store them in ~/Library/Spelling. Check that hunspell is recognizing your dictionaries.
$ hunspell -D
  • Tell Doom Emacs you are using hunspell in your init.el file:
(...)
: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-fu is marking every word in your documents as incorrect. (This applies not only for hunspell but also for aspell and enchant.)

    You can get a list of valid dictionary names by changing the dictionary manually within Emacs, i.e. M-x ispell-change-dictionary.

(setq ispell-dictionary "english")

Join my free newsletter and receive updates directly to your inbox.