fix(corfu): disable corfu-auto in evil replace mode

Ref: 63e9b11280
This commit is contained in:
Henrik Lissner 2024-09-01 14:49:04 -04:00
parent 63e9b11280
commit fb2f79033c
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -92,6 +92,10 @@ See `+corfu-want-minibuffer-completion'."
(not (run-hook-with-args-until-success '+corfu-inhibit-auto-functions))))) (not (run-hook-with-args-until-success '+corfu-inhibit-auto-functions)))))
(apply fn args))) (apply fn args)))
(when (modulep! :editor evil)
;; Modifying the buffer while in replace mode can be janky.
(add-to-list '+corfu-inhibit-auto-functions #'evil-replace-state-p))
;; HACK: If you want to update the visual hints after completing minibuffer ;; HACK: If you want to update the visual hints after completing minibuffer
;; commands with Corfu and exiting, you have to do it manually. ;; commands with Corfu and exiting, you have to do it manually.
(defadvice! +corfu--insert-before-exit-minibuffer-a () (defadvice! +corfu--insert-before-exit-minibuffer-a ()