mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
completion/ivy: inhibit ivy completion in evil-ex
`ivy-completion-in-region' struggles with completing certain +evil-ex-specific constructs, like globs (:e prefix*.el) or vim filename modifiers (:e %:p:h).
This commit is contained in:
@ -87,6 +87,13 @@ immediately runs it on the current candidate (ending the ivy session)."
|
||||
(after! yasnippet
|
||||
(add-to-list 'yas-prompt-functions #'+ivy-yas-prompt nil #'eq))
|
||||
|
||||
(defun +ivy*inhibit-ivy-in-evil-ex (orig-fn &rest args)
|
||||
"`ivy-completion-in-region' struggles with completing certain
|
||||
evil-ex-specific constructs, so we disable it solely in evil-ex."
|
||||
(let ((completion-in-region-function #'completion--in-region))
|
||||
(apply orig-fn args)))
|
||||
(advice-add #'evil-ex :around #'+ivy*inhibit-ivy-in-evil-ex)
|
||||
|
||||
(define-key! ivy-mode-map
|
||||
[remap switch-to-buffer] #'+ivy/switch-buffer
|
||||
[remap switch-to-buffer-other-window] #'+ivy/switch-buffer-other-window
|
||||
|
Reference in New Issue
Block a user