emacs で spellcheck といえば ispell ですが、今は hunspell というのがいいらしい。
$brew install hunspell
(use-package ispell
:custom
(ispell-program-name "hunspell")
(ispell-really-hunspell t)
ispell, flyspell で error になる。
Error enabling Flyspell mode:
(Can't find Hunspell dictionary with a .aff affix file)
commandline でも error になる。
$hunspell -d en_US hoge.txt
Can't open affix or dictionary files for dictionary named "en_US".
辞書を dl して mv する
$wget -O en_US.aff https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.aff?id=a4473e06b56bfe35187e302754f6baaa8d75e54f
$wget -O en_US.dic https://cgit.freedesktop.org/libreoffice/dictionaries/plain/en/en_US.dic?id=a4473e06b56bfe35187e302754f6baaa8d75e54f
$mv en_US.* Library/Spelling/
環境変数 DICTIONARY に en_US
(use-package ispell
:custom
(ispell-program-name "hunspell")
(ispell-really-hunspell t)
:config
(setenv "DICTIONARY" "en_US")
ok.