2020-07-12 23:11:39 -03:00
|
|
|
#+TITLE: checkers/spell
|
|
|
|
#+DATE: January 9, 2020
|
|
|
|
#+SINCE: v3.0.0
|
|
|
|
#+STARTUP: inlineimages nofold
|
|
|
|
|
|
|
|
* Table of Contents :TOC_3:noexport:
|
|
|
|
- [[#description][Description]]
|
|
|
|
- [[#maintainers][Maintainers]]
|
|
|
|
- [[#module-flags][Module Flags]]
|
|
|
|
- [[#plugins][Plugins]]
|
|
|
|
- [[#prerequisites][Prerequisites]]
|
|
|
|
- [[#features][Features]]
|
|
|
|
- [[#configuration][Configuration]]
|
2020-08-21 02:41:41 -04:00
|
|
|
- [[#changing-how-quickly-spell-fu-spellchecks-after-changes][Changing how quickly spell-fu spellchecks after changes]]
|
|
|
|
- [[#reducing-false-positives-by-disabling-spelling-on-certain-faces][Reducing false positives by disabling spelling on certain faces]]
|
|
|
|
- [[#adding-or-removing-words-to-your-personal-dictionary][Adding or removing words to your personal dictionary]]
|
2020-07-12 23:11:39 -03:00
|
|
|
- [[#troubleshooting][Troubleshooting]]
|
|
|
|
|
|
|
|
* Description
|
|
|
|
This modules provides spellchecking powered by =aspell= or =hunspell=.
|
|
|
|
|
2020-08-21 02:41:41 -04:00
|
|
|
Spellcheck is automatically loaded in all ~text-mode~ derivatives, which
|
|
|
|
includes ~org-mode~, ~markdown-mode~, the Git Commit buffer (from magit),
|
|
|
|
~mu4e-compose-mode~, and others.
|
2020-07-12 23:11:39 -03:00
|
|
|
|
|
|
|
** Maintainers
|
|
|
|
This module has no dedicated maintainers.
|
|
|
|
|
|
|
|
** Module Flags
|
2020-08-21 02:41:41 -04:00
|
|
|
+ =+aspell= Use =aspell= as a backend for correcting words.
|
|
|
|
+ =+hunspell= Use =hunspell= as a backend for correcting words.
|
|
|
|
+ =+everywhere= Use spellcheck in prog-mode and conf-mode derivatives as well as
|
|
|
|
text-mode. Basically, enable =spell-fu-mode= everywhere.
|
2020-07-12 23:11:39 -03:00
|
|
|
|
|
|
|
** Plugins
|
2020-08-21 02:41:41 -04:00
|
|
|
+ [[https://gitlab.com/ideasman42/emacs-spell-fu][spell-fu]]
|
2020-07-12 23:11:39 -03:00
|
|
|
|
|
|
|
* Prerequisites
|
2020-08-21 02:41:41 -04:00
|
|
|
This module requires =aspell= to be installed, whether or not you intend to use
|
|
|
|
=hunspell= as the word correction backend. =spell-fu= does not yet support
|
|
|
|
generating the word list with a custom command or =hunspell=, but =hunspell= can
|
|
|
|
still be used to provide correction suggestions when invoking ~ispell-word~.
|
2020-07-12 23:11:39 -03:00
|
|
|
|
2020-08-21 02:41:41 -04:00
|
|
|
You will need =hunspell= installed (via your OS package manager) to use it as a
|
|
|
|
correction backend.
|
2020-07-12 23:11:39 -03:00
|
|
|
|
|
|
|
* Features
|
2020-08-21 02:41:41 -04:00
|
|
|
+ Spellchecking based on =aspell=.
|
|
|
|
+ Spell correction using =aspell= or =hunspell= (through ~M-x ispell-word~).
|
|
|
|
+ Ignores source code inside org or markdown files.
|
2020-07-12 23:11:39 -03:00
|
|
|
|
2020-08-21 02:41:41 -04:00
|
|
|
When using =+everywhere=, ~spell-fu-mode~ is activated for as many major modes
|
|
|
|
as possible, and not only ~text-mode~ derivatives. =spell-fu= will only spell
|
|
|
|
check comments in programming major modes.
|
2020-07-12 23:11:39 -03:00
|
|
|
|
|
|
|
* Configuration
|
|
|
|
Dictionary is set by =ispell-dictionary= variable. Can be changed locally with
|
|
|
|
the function =ispell-change-dictionary=.
|
|
|
|
|
2020-08-21 02:41:41 -04:00
|
|
|
** Changing how quickly spell-fu spellchecks after changes
|
|
|
|
Adjust ~spell-fu-idle-delay~ to change how long spell-fu waits to spellcheck
|
|
|
|
after recent changes (its default value as ~0.25~).
|
2020-07-12 23:11:39 -03:00
|
|
|
|
|
|
|
#+BEGIN_SRC elisp
|
2020-08-21 02:41:41 -04:00
|
|
|
(after! spell-fu
|
|
|
|
(setq spell-fu-idle-delay 0.5))
|
2020-07-12 23:11:39 -03:00
|
|
|
#+END_SRC
|
|
|
|
|
2020-08-21 02:41:41 -04:00
|
|
|
** Reducing false positives by disabling spelling on certain faces
|
|
|
|
Exclude what faces to not preform spellchecking on by setting
|
|
|
|
~spell-fu-faces-exclude~ in a buffer-local hook:
|
|
|
|
|
2020-07-12 23:11:39 -03:00
|
|
|
#+BEGIN_SRC elisp
|
2020-08-21 02:41:41 -04:00
|
|
|
(setq-hook! 'markdown-mode-hook
|
|
|
|
spell-fu-faces-exclude '(markdown-code-face
|
|
|
|
markdown-reference-face
|
|
|
|
markdown-link-face
|
|
|
|
markdown-url-face
|
|
|
|
markdown-markup-face
|
|
|
|
markdown-html-attr-value-face
|
|
|
|
markdown-html-attr-name-face
|
|
|
|
markdown-html-tag-name-face))
|
2020-07-12 23:11:39 -03:00
|
|
|
#+END_SRC
|
|
|
|
|
2020-08-21 02:41:41 -04:00
|
|
|
** Adding or removing words to your personal dictionary
|
|
|
|
Use ~M-x spell-fu-word-add~ and ~M-x spell-fu-word-remove~ to whitelist words
|
|
|
|
that you know are not misspellings.
|
|
|
|
|
|
|
|
* TODO Troubleshooting
|