Skip to content

Commit

Permalink
Restore user ability to toggle ivy related hydras
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AloisJanicek committed Dec 14, 2020
1 parent e769689 commit 8afd8a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/completion/ivy/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ results buffer.")
(after! yasnippet
(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
[remap doom/delete-backward-word] #'ivy-backward-kill-word
"C-c C-e" #'+ivy/woccur
Expand Down

0 comments on commit 8afd8a6

Please sign in to comment.