From 8afd8a6ce89606a72b53fd693bc512049da6c0a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alois=20Jan=C3=AD=C4=8Dek?= Date: Tue, 15 Dec 2020 00:28:50 +0100 Subject: [PATCH] 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. --- modules/completion/ivy/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 72d0a23c5..fd5867ccb 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -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