Prevent flycheck-correct if region/insert mode is active
This commit is contained in:
parent
8a01ef9082
commit
206d0d9d92
1 changed files with 9 additions and 4 deletions
|
@ -75,10 +75,15 @@ e.g. proselint and langtool."
|
||||||
;; used in their respective major modes.
|
;; used in their respective major modes.
|
||||||
(add-hook 'flyspell-mode-hook #'+spell-init-flyspell-predicate-h)
|
(add-hook 'flyspell-mode-hook #'+spell-init-flyspell-predicate-h)
|
||||||
|
|
||||||
(map! :map flyspell-mouse-map
|
(let ((flyspell-correct
|
||||||
"RET" #'flyspell-correct-at-point
|
(general-predicate-dispatch nil
|
||||||
[return] #'flyspell-correct-at-point
|
(and (not (or mark-active (ignore-errors (evil-insert-state-p))))
|
||||||
[mouse-1] #'flyspell-correct-at-point))
|
(memq 'flyspell-incorrect (face-at-point nil t)))
|
||||||
|
#'flyspell-correct-at-point)))
|
||||||
|
(map! :map flyspell-mouse-map
|
||||||
|
"RET" flyspell-correct
|
||||||
|
[return] flyspell-correct
|
||||||
|
[mouse-1] #'flyspell-correct-at-point)))
|
||||||
|
|
||||||
|
|
||||||
(use-package! flyspell-correct
|
(use-package! flyspell-correct
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue