spell-checking: new package flyspell-popup

This commit is contained in:
Uri Sharf 2016-06-01 22:52:05 -04:00 committed by syl20bnr
parent b809aba5e8
commit f367c4b5aa
3 changed files with 28 additions and 7 deletions

View File

@ -7,6 +7,7 @@
- [[#spell-checker-configuration][Spell Checker Configuration]]
- [[#disabling-by-default][Disabling by default]]
- [[#enabling-auto-dictionary-mode][Enabling auto-dictionary-mode]]
- [[#enable-auto-completion-popup][Enable auto-completion popup]]
- [[#key-bindings][Key Bindings]]
* Description
@ -78,12 +79,21 @@ currently supported language:
| spanish |
| swedish |
** Enable auto-completion popup
To enable auto-completion popup when the point is idle on a misspelled word
set the layer variable =enable-flyspell-auto-completion= to t:
#+BEGIN_SRC emacs-lisp
(setq-default dotspacemacs-configuration-layers
'((spell-checking :variables =enable-flyspell-auto-completion= t)))
#+END_SRC
* Key Bindings
| Key Binding | Description |
|-------------+--------------------------|
| ~SPC S b~ | flyspell whole buffer |
| ~SPC S c~ | flyspell correct |
| ~SPC S d~ | change dictionary |
| ~SPC S n~ | flyspell goto next error |
| ~SPC t S~ | toggle flyspell |
| Key Binding | Description |
|-------------+--------------------------------|
| ~SPC S b~ | flyspell whole buffer |
| ~SPC S c~ | flyspell correct |
| ~SPC S d~ | change dictionary |
| ~SPC S n~ | flyspell goto next error |
| ~SPC t S~ | toggle flyspell |

View File

@ -14,3 +14,6 @@
(defvar spell-checking-enable-auto-dictionary nil
"Specify if auto-dictionary should be enabled or not.")
(defvar enable-flyspell-auto-completion nil
"If not nil, show speeling suggestions in popups.")

View File

@ -14,6 +14,7 @@
auto-dictionary
flyspell
flyspell-correct
(flyspell-popup :toggle enable-flyspell-auto-completion)
))
(defun spell-checking/init-auto-dictionary ()
@ -73,3 +74,10 @@
(setq flyspell-correct-interface 'flyspell-correct-helm))
(when (bound-and-true-p flyspell-correct-interface)
(spacemacs/set-leader-keys "Sc" 'flyspell-correct-word-generic))))
(defun spell-checking/init-flyspell-popup ()
(use-package flyspell-popup
:defer t
:init
(progn
(add-hook 'flyspell-mode-hook 'flyspell-popup-auto-correct-mode))))