summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-14 19:14:05 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-14 19:14:05 -0700
commit3fc415cde2b8caf97f5b872b5ea361db31b32d23 (patch)
treeb7fd46ee3cf22b82bb5288301220647562240b88 /emacs
parentconf: configure CSS (diff)
downloademacs.d-3fc415cde2b8caf97f5b872b5ea361db31b32d23.tar.gz
replace avy/counsel with vertico/consult
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/my-completion.el42
-rw-r--r--emacs/custom/my-eshell.el2
-rw-r--r--emacs/custom/my-git.el3
-rw-r--r--emacs/custom/my-navigation.el44
-rw-r--r--emacs/custom/my-settings.el4
-rw-r--r--emacs/init.el1
6 files changed, 48 insertions, 48 deletions
diff --git a/emacs/custom/my-completion.el b/emacs/custom/my-completion.el
new file mode 100644
index 0000000..98744a7
--- /dev/null
+++ b/emacs/custom/my-completion.el
@@ -0,0 +1,42 @@
+;;; my-completion.el --- Configure parts related to completion
+;;; Commentary:
+;;; Code:
+
+(require 'use-package)
+
+(use-package vertico
+  :ensure t
+  :init
+  (vertico-mode))
+
+(use-package marginalia
+  :ensure t
+  :init
+  (marginalia-mode))
+
+(use-package consult
+  :ensure t
+  :bind (("C-c h"   . consult-history)
+         ("C-c m"   . consult-mode-command)
+         ("C-x b"   . consult-buffer)
+         ("C-x 4 b" . consult-buffer-other-window)
+         ("C-x r b" . consult-bookmark)
+         ("C-x p b" . consult-project-buffer)
+         ("M-y"     . consult-yank-pop)
+         ("M-g e"   . consult-compile-error)
+         ("M-g f"   . consult-flymake)
+         ("M-g M-g" . consult-goto-line)
+         ("M-g o"   . consult-outline)
+         ("M-g m"   . consult-mark)
+         ("M-g k"   . consult-global-mark)
+         ("C-c i"   . consult-imenu)
+         ("M-s d"   . consult-find)
+         ("C-c f"   . consult-git-grep)
+         ("C-c /"   . consult-ripgrep)
+         ("M-s l"   . consult-line)
+         ("M-s L"   . consult-line-multi)
+         ("M-s m"   . consult-multi-occur)
+         ("M-s k"   . consult-keep-lines)))
+
+(provide 'my-completion)
+;;; my-completion.el ends here
diff --git a/emacs/custom/my-eshell.el b/emacs/custom/my-eshell.el
index 76c32f4..58d63b7 100644
--- a/emacs/custom/my-eshell.el
+++ b/emacs/custom/my-eshell.el
@@ -46,7 +46,6 @@
   (eshell/alias "gs" "magit-status")
   (eshell/alias "gd" "magit-diff-unstaged")
   (eshell/alias "gds" "magit-diff-staged")
-  (eshell/alias "rg" "counsel-rg")
   (eshell/alias "cal" "calendar")
   (eshell/alias "agenda" "org-agenda"))
 
@@ -149,7 +148,6 @@ append to it, while separating multiple outputs with
   :commands (eshell eshell-command)
   :bind (("C-c e h" . my/eshell-here)
          ("C-c e e" . my/eshell-export)
-         ("C-c r"   . counsel-esh-history)
          :map eshell-mode-map
          ("C-o" . my/eshell-open-file-at-point))
   :custom
diff --git a/emacs/custom/my-git.el b/emacs/custom/my-git.el
index 020865c..51648ec 100644
--- a/emacs/custom/my-git.el
+++ b/emacs/custom/my-git.el
@@ -18,8 +18,7 @@
   :after (flyspell)
   :bind (("C-x g" . magit-status))
   :custom
-  (vc-follow-symlinks t)
-  (magit-completing-read-function 'ivy-completing-read))
+  (vc-follow-symlinks t))
 
 (use-package magit-repos
   :ensure nil
diff --git a/emacs/custom/my-navigation.el b/emacs/custom/my-navigation.el
index e9197b5..74cd293 100644
--- a/emacs/custom/my-navigation.el
+++ b/emacs/custom/my-navigation.el
@@ -69,50 +69,6 @@
   (rg-align-line-column-separator "#")
   (rg-align-position-content-separator "|"))
 
-(use-package counsel
-  :diminish counsel-mode
-  :ensure t
-  :after ivy
-  :init (counsel-mode 1)
-  :bind
-  (("M-x"     . counsel-M-x)
-   ("C-x C-f" . counsel-find-file)
-   ("C-x C-r" . counsel-recentf)
-   ("C-c i "  . counsel-imenu)
-   ("C-c f"   . counsel-git)
-   ("C-c /"   . counsel-rg)
-   ("C-c m"   . counsel-mark-ring)
-   ("C-c V"   . counsel-describe-variable)
-   ("C-c C-l" . counsel-find-library)
-   ("C-c U"   . counsel-unicode-char)
-   ("C-x r l" . counsel-bookmark))
-  :custom
-  (counsel-find-file-ignore-regexp "\\.git\\|\\.DS_Store\\|\\.localized\\'")
-  (counsel-find-file-at-point t))
-
-(use-package ivy
-  :ensure t
-  :diminish ivy-mode
-  :init (ivy-mode 1)
-  :custom
-  (ivy-use-virtual-buffers t)
-  (ivy-count-format "(%d/%d) ")
-  (ivy-height 20)
-  (ivy-use-selectable-prompt t)
-  :bind (("C-x b"   . ivy-switch-buffer)
-         ("C-s"     . swiper)))
-
-(use-package ivy-rich
-  :ensure t
-  :after (ivy)
-  :config
-  (ivy-rich-mode 1)
-  :custom
-  (ivy-extra-directories '("../" "./"))
-  (ivy-virtual-abbreviate 'full)
-  (ivy-rich-switch-buffer-align-virtual-buffer t)
-  (ivy-rich-path-style 'abbrev))
-
 (use-package which-key
   :diminish which-key-mode
   :ensure t
diff --git a/emacs/custom/my-settings.el b/emacs/custom/my-settings.el
index 8e23039..7e6d15d 100644
--- a/emacs/custom/my-settings.el
+++ b/emacs/custom/my-settings.el
@@ -55,6 +55,10 @@
              (server-running-p))
   (server-start))
 
+(use-package savehist
+  :init
+  (savehist-mode))
+
 (use-package exec-path-from-shell
   :ensure t
   :if (memq window-system '(mac ns))
diff --git a/emacs/init.el b/emacs/init.el
index b41f1a7..9c92d65 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -44,6 +44,7 @@
 (require 'my-settings)
 (require 'my-ui)
 (require 'my-navigation)
+(require 'my-completion)
 (require 'my-edit)
 (require 'my-text)
 (require 'my-git)