summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-04-17 22:12:19 +0200
committerAlan Pearce2023-04-17 22:12:19 +0200
commita9cbb254fb271f75e865ad7f5673c39b58c444bb (patch)
treed9d96bba2c0b25fb43859979ad5c5b9d673c0b20
parent0f6e5efe6b8d2418fef02755dae1ae2c1bb823e8 (diff)
downloadnixfiles-a9cbb254fb271f75e865ad7f5673c39b58c444bb.tar.lz
nixfiles-a9cbb254fb271f75e865ad7f5673c39b58c444bb.tar.zst
nixfiles-a9cbb254fb271f75e865ad7f5673c39b58c444bb.zip
emacs: use consult commands to replace/enhance other packages
-rw-r--r--user/emacs/init.el19
-rw-r--r--user/settings/emacs.nix2
2 files changed, 9 insertions, 12 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 9aa0b715..45369fad 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -249,6 +249,14 @@ With two prefix arguments, write out the day and month name."
 			completion-category-defaults nil
 			completion-category-overrides '((file (styles basic partial-completion))))
 
+(use-package consult
+  :general (:keymaps 'projectile-command-map
+                     "b" #'consult-project-buffer
+                     "s s" #'consult-ripgrep
+                     "s r" #'consult-ripgrep)
+  :general ([remap isearch-forward] #'consult-line
+            [remap isearch-backward] #'consult-line))
+
 (use-package smerge-mode
   :after magit
   :config
@@ -289,10 +297,6 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
                                    (when (bound-and-true-p smerge-mode)
                                      (unpackaged/smerge-hydra/body)))))
 
-(use-package ctrlf
-  :init (ctrlf-mode +1))
-
-
 ;;; Windows
 
 (defun split-window-properly (&optional window)
@@ -943,11 +947,6 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
               (evil-ex-define-cmd "pb" #'projectile-switch-to-buffer)
               (evil-ex-define-cmd "psw[itch]" #'projectile-switch-project))))
 
-(use-package counsel-projectile
-  :general (:keymaps 'projectile-command-map
-                     "s s" #'counsel-projectile-rg
-                     "s r" #'counsel-projectile-rg))
-
 (use-package envrc
   :defer 2
   :after projectile
@@ -1185,7 +1184,7 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   "o" #'other-window
   "u" #'universal-argument
   ";" #'execute-extended-command
-  "bb" #'switch-to-buffer
+  "bb" #'consult-switch-buffer
   "bx" #'kill-this-buffer
   "br" #'revert-buffer
   "bk" #'kill-buffer
diff --git a/user/settings/emacs.nix b/user/settings/emacs.nix
index db0c3357..372af9cd 100644
--- a/user/settings/emacs.nix
+++ b/user/settings/emacs.nix
@@ -91,9 +91,7 @@ in
         consult
         consult-eglot
         counsel
-        counsel-projectile
         crux
-        ctrlf
         dired-git-info
         envrc
         editorconfig