selectrum: add spellcheck support

This commit is contained in:
Itai Y. Efrat 2021-04-29 12:43:16 +03:00
parent b9e34835c7
commit 8e6371760a
4 changed files with 7 additions and 4 deletions

View file

@ -46,7 +46,7 @@ This module has no dedicated maintainers.
+ [[https://github.com/d12frosted/flyspell-correct][flyspell-correct]] + [[https://github.com/d12frosted/flyspell-correct][flyspell-correct]]
+ [[https://github.com/d12frosted/flyspell-correct#flyspell-correct-ivy-interface][flyspell-correct-ivy]] (=completion/ivy=) + [[https://github.com/d12frosted/flyspell-correct#flyspell-correct-ivy-interface][flyspell-correct-ivy]] (=completion/ivy=)
+ [[https://github.com/d12frosted/flyspell-correct#flyspell-correct-helm-interface][flyspell-correct-helm]] (=completion/helm=) + [[https://github.com/d12frosted/flyspell-correct#flyspell-correct-helm-interface][flyspell-correct-helm]] (=completion/helm=)
+ [[https://github.com/d12frosted/flyspell-correct#flyspell-correct-popup-interface][flyspell-correct-popup]] (if *neither* =completion/ivy= or =completion/helm=) + [[https://github.com/d12frosted/flyspell-correct#flyspell-correct-popup-interface][flyspell-correct-popup]] (if *neither* =completion/ivy=, =completion/helm= or =completion/selectrum=)
+ [[https://github.com/rolandwalker/flyspell-lazy][flyspell-lazy]] + [[https://github.com/rolandwalker/flyspell-lazy][flyspell-lazy]]
+ else + else
+ [[https://gitlab.com/ideasman42/emacs-spell-fu][spell-fu]] + [[https://gitlab.com/ideasman42/emacs-spell-fu][spell-fu]]

View file

@ -62,7 +62,8 @@
(save-current-buffer (save-current-buffer
(ispell-accept-buffer-local-defs)) (ispell-accept-buffer-local-defs))
(if (not (or (featurep! :completion ivy) (if (not (or (featurep! :completion ivy)
(featurep! :completion helm))) (featurep! :completion helm)
(featurep! :completion selectrum)))
(call-interactively #'ispell-word) (call-interactively #'ispell-word)
(cl-destructuring-bind (start . end) (cl-destructuring-bind (start . end)
(or (bounds-of-thing-at-point 'word) (or (bounds-of-thing-at-point 'word)

View file

@ -234,7 +234,8 @@ e.g. proselint and langtool."
(require 'flyspell-correct-helm nil t))) (require 'flyspell-correct-helm nil t)))
((and (featurep! :completion ivy) ((and (featurep! :completion ivy)
(require 'flyspell-correct-ivy nil t))) (require 'flyspell-correct-ivy nil t)))
((require 'flyspell-correct-popup nil t) ((featurep! :completion selectrum)) ; selectrum doesn't need any extra configuration
((require 'flyspell-correct-popup nil t) ; only use popup if no compatible completion UI is enabled
(setq flyspell-popup-correct-delay 0.8) (setq flyspell-popup-correct-delay 0.8)
(define-key popup-menu-keymap [escape] #'keyboard-quit)))) (define-key popup-menu-keymap [escape] #'keyboard-quit))))

View file

@ -8,5 +8,6 @@
(package! flyspell-correct-ivy)) (package! flyspell-correct-ivy))
((featurep! :completion helm) ((featurep! :completion helm)
(package! flyspell-correct-helm)) (package! flyspell-correct-helm))
((package! flyspell-correct-popup))) ((not (featurep! :completion selectrum))
(package! flyspell-correct-popup)))
(package! flyspell-lazy :pin "0fc5996bcee20b46cbd227ae948d343c3bef7339")) (package! flyspell-lazy :pin "0fc5996bcee20b46cbd227ae948d343c3bef7339"))