     [remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer
     [remap imenu-anywhere]         #'ivy-imenu-anywhere)
 
-  (ivy-mode +1))
-
-
-;; Show more buffer information in switch-buffer commands
-(def-package! ivy-rich
-  :after ivy
-  :config
-  (dolist (cmd '(ivy-switch-buffer +ivy/switch-workspace-buffer
-                 counsel-projectile-switch-to-buffer))
-    (ivy-set-display-transformer cmd '+ivy-buffer-transformer)))
+  (ivy-mode +1)
+
+  ;; Show more buffer information in switch-buffer commands
+  (after! ivy-rich
+    (dolist (cmd '(ivy-switch-buffer +ivy/switch-workspace-buffer
+                   counsel-projectile-switch-to-buffer))
+      (ivy-set-display-transformer cmd '+ivy-buffer-transformer)))
+
+  (def-package! ivy-hydra
+    :commands (ivy-dispatching-done-hydra ivy--matcher-desc)
+    :init
+    (define-key! ivy-minibuffer-map
+      "\C-o"      #'+ivy-coo-hydra/body
+      (kbd "M-o") #'ivy-dispatching-done-hydra)))
 
 
 (def-package! counsel

     ("L" (lambda (path) "Insert org-link with absolute path"
            (with-ivy-window (insert (format "[[%s]]" path)))) "insert org-link (abs. path)")))

  ;; Configure `counsel-rg', `counsel-ag' & `counsel-pt'
  (dolist (cmd '(counsel-ag counsel-rg counsel-pt))
    (ivy-add-actions
     cmd
     '(("O" +ivy-git-grep-other-window-action "open in other window")))))


(def-package! counsel-projectile

  ;; posframe doesn't work well with async sources
  (dolist (fn '(swiper counsel-rg counsel-ag counsel-pt counsel-grep counsel-git-grep))
    (setf (alist-get fn ivy-display-functions-alist) #'ivy-display-function-fallback)))


;; Used by `counsel-M-x'
