From 8a7c5ee5991ecd13594711f508980169acaa9a39 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 13 Jan 2020 12:55:20 -0800 Subject: emacs/text: flyspell configuration. Only use the `flyspell` package if we can find the binary for `aspell` on the host. Move a couple of settings from `:config` to `:custom`. Use `flyspell-correct-ivy`, which is a better UX (for me) than a buffer at the top of the frame. --- emacs.d/custom/fcuny-text.el | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'emacs.d') diff --git a/emacs.d/custom/fcuny-text.el b/emacs.d/custom/fcuny-text.el index 73f93a4..45198a1 100644 --- a/emacs.d/custom/fcuny-text.el +++ b/emacs.d/custom/fcuny-text.el @@ -1,18 +1,19 @@ (use-package flyspell + :ensure t + :if (executable-find "aspell") :hook ((text-mode . flyspell-mode) (prog-mode . flyspell-prog-mode)) + :custom + (ispell-dictionary "en_US") + (ispell-program-name "aspell") :config - (setq ispell-dictionary "en_US") - - (when (executable-find "aspell") - (setq ispell-program-name "aspell")) - - (use-package flyspell-correct - :after (flyspell) - :commands (flyspell-correct-word-generic - flyspell-correct-previous-word-generic) + (use-package flyspell-correct-ivy + :after flyspell + :ensure t :bind (:map flyspell-mode-map - ("C-;" . flyspell-correct-previous-word-generic)))) + ("C-M-:" . flyspell-correct-at-point)) + :custom + (flyspell-correct-interface #'flyspell-correct-ivy))) (use-package markdown-mode :ensure t -- cgit 1.4.1