         ivy-wrap t
         ivy-initial-inputs-alist nil))
 
+(use-package hydra
+  :ensure t
+  :defer t)
+
 (use-package ivy-hydra
   :ensure t
   :after ivy)
 
 (use-package ivy-rich
   :ensure t
-  :after ivy
   :config
   (setq ivy-rich-switch-buffer-align-virtual-buffer t)
   (ivy-set-display-transformer 'ivy-switch-buffer 'ivy-rich-switch-buffer-transformer))
 
 (use-package ivy-xref
   :ensure t
-  :after ivy
   :config
   (setq xref-show-xrefs-function 'ivy-xref-show-xrefs))
 


(use-package counsel
  :ensure t
  :after ivy
  :config
  (setq counsel-mode-override-describe-bindings t
        counsel-find-file-at-point t
        confirm-nonexistent-file-or-buffer t
        enable-recursive-minibuffers t)
  (fset 'describe-function 'counsel-describe-function)
  (fset 'describe-variable 'counsel-describe-variable))

(use-package amx
  :ensure t

  :config
  (setq amx-auto-update-interval 10
        amx-history-length 5
        amx-backend 'ivy)
  (defalias 'counsel-M-x 'amx))

(use-package projectile
  :ensure t
  :init
  (setq projectile-cache-file (expand-file-name (concat user-emacs-directory ".cache/projectile.cache"))
        projectile-known-projects-file (expand-file-name (concat user-emacs-directory ".cache/projectile-bookmarks.eld")))
