 ;;
 
 (use-package smex
-  :disabled
   :custom
   (smex-history-length 16))
 
-(use-package selectrum-prescient
+(use-package ivy
+  :general
+  (:keymaps 'ivy-mode-map
+            "<escape>" #'keyboard-quit-context+)
+  :custom
+  (ivy-count-format "")
+  (ivy-height 7)
+  (ivy-use-virtual-buffers t)
+  (ivy-virtual-abbreviate 'full)
+  (ivy-wrap t)
+  :init
+  (ivy-mode t))
+
+(use-package counsel
+  :general
+  (:prefix "M-s"
+           "c" #'counsel-rg
+           "g" #'counsel-git-grep
+           "s" #'swiper)
   :preface
-  (defun user/execute-extended-command (orig-fun &rest r)
+  ;; http://xenodium.com/emacss-counsel-m-x-meets-multiple-cursors/index.html
+  (defun user/counsel-M-x-action (orig-fun &rest r)
     "Additional support for multiple cursors."
     (apply orig-fun r)
-    (let ((cmd (intern (string-trim-left (nth 1 r) "\\^"))))
+    (let ((cmd (intern (string-trim-left (nth 0 r) "\\^"))))
       (when (and (boundp 'multiple-cursors-mode)
                  multiple-cursors-mode
                  cmd


(csetq
 package-selected-packages
 '(beginend cmake-font-lock cmake-mode comment-dwim-2 ccls company consult
   consult-selectrum cython-mode diff-hl dired-du dired-git-info dired-narrow
   diredfl dumb-jump eacl elfeed embark eterm-256color eterm-256color-mode
   expand-region flycheck flycheck-pos-tip geiser general git-timemachine
   goggles helpful haskell-mode hl-todo hydra iedit iy-go-to-char js2-mode
   json-mode log4j-mode lsp-mode lsp-ui magit magit-gitflow marginalia minions
   modern-cpp-font-lock modus-themes multi-term multiple-cursors nasm-mode
   no-littering nov org pdf-tools pyvenv racket-mode rainbow-delimiters
   rainbow-mode realgud rg rust-mode selectrum-prescient smex string-inflection
   symbol-overlay tree-sitter tree-sitter-langs undo-tree use-package vc-msg
   visual-fill-column web-mode wgrep which-key yaml-mode yasnippet))

(unless (bound-and-true-p package--initialized)
  (package-initialize))

  (:keymaps 'dired-mode-map
            ")" #'dired-git-info-mode))

(use-package auto-package-update
  :custom
  (auto-package-update-delete-old-versions t)
  :defer t)

;;
;; Editing & navigation
;;
