3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Windows10上のspacemacsでスペルチェックする

Last updated at Posted at 2019-11-16
  • spacemacsには Flyspell-modeがある(スペルチェックできる)
  • dotspacemacs-configuration-layersspell-checkingを設定している場合に Error enabling Flyspell mode: (Searching for program No such file or directory ispell)と出てスペルチェックされなかったアレ(辞書の設定とかすれば使える)
  • Windows10で素直にやろうとするとハマる

まず Hunspell推奨

spacemacsで Hunspellを利用する

Hunspellインストール

参考 => https://texwiki.texjp.org/?Hunspell#y7b755eb

環境変数の設定

  • Windows10環境変数名に DICTIONARY追加(名前: DICTIONARY 値: en_US
  • .spacemacs.envにも DICTIONARY=en_USを追加(自動でも手動でも良い)

.spacemacsの設定

  • spacemacsの設定ファイル .spacemacsSpace f e dで開ける)の dotspacemacs-configuration-layersspell-checkingを追記(もうされてるかも?)
   dotspacemacs-configuration-layers
   '(
     ;; ----------------------------------------------------------------
     ;; Example of useful layers you may want to use right away.
     ;; Uncomment some layer names and press <SPC f e R> (Vim style) or
     ;; <M-m f e R> (Emacs style) to install them.
     ;; ----------------------------------------------------------------
     sql
     python
     markdown
     ...

     ;; これ
     (spell-checking :variables enable-flyspell-auto-completion nil)

     ...
     )
  • 同じく .spacemacsuser-init ()はこんな感じに追記する
(defun dotspacemacs/user-init ()
  "Initialization function for user code.
It is called immediately after `dotspacemacs/init', before layer configuration
executes.
 This function is mostly useful for variables that need to be set
before packages are loaded. If you are unsure, you should try in setting them in
`dotspacemacs/user-config' first."

  ;; MSYS2経由でインストールしたパッケージを使う
  (add-to-list 'exec-path "C:\\msys64\\mingw64\\bin")

  ;; FlyspellにHunspellを使う
  (setq ispell-program-name "hunspell")
  )

exec-pathMSYS2のインストール場所から辿った mingwのbinまでのパスを書く。

🎉🎉🎉🎉🎉

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?