Restore user ability to toggle ivy related hydras

There are two hydras that can be opened from ivy interface:

1. `ivy-dispatching-done' (doom key: "C-o", vanilla key: "M-o")
2. `hydra-ivy/body'       (doom key: "M-o", vanilla key: "C-o")

Original behavior is that they both can be exited / toggled
by the same key they were opened.

This commit restores the original behaviour but does it without
reverting the decision to swap the "C-o" and "M-o" key bindings.
This commit is contained in:
Alois Janíček 2020-12-15 00:28:50 +01:00
parent e7696893f4
commit 8afd8a6ce8
No known key found for this signature in database
GPG key ID: 2EA1F5904801C5AA

View file

@ -96,6 +96,12 @@ results buffer.")
(after! yasnippet (after! yasnippet
(add-hook 'yas-prompt-functions #'+ivy-yas-prompt-fn)) (add-hook 'yas-prompt-functions #'+ivy-yas-prompt-fn))
(after! ivy-hydra
;; Ensure `ivy-dispatching-done' and `hydra-ivy/body' hydras can be
;; exited / toggled by the same key binding they were opened
(add-to-list 'ivy-dispatching-done-hydra-exit-keys '("C-o" nil))
(defhydra+ hydra-ivy () ("M-o" nil)))
(define-key! ivy-minibuffer-map (define-key! ivy-minibuffer-map
[remap doom/delete-backward-word] #'ivy-backward-kill-word [remap doom/delete-backward-word] #'ivy-backward-kill-word
"C-c C-e" #'+ivy/woccur "C-c C-e" #'+ivy/woccur