emacs: use consult commands to replace/enhance other packages
Alan Pearce alan@alanpearce.eu
Mon, 17 Apr 2023 22:12:19 +0200
2 files changed, 9 insertions(+), 12 deletions(-)
M user/emacs/init.el → user/emacs/init.el
@@ -249,6 +249,14 @@ completion-styles '(flex substring basic) 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 @@ -288,10 +296,6 @@ ("q" nil "cancel" :color blue)) :hook (magit-diff-visit-file . (lambda () (when (bound-and-true-p smerge-mode) (unpackaged/smerge-hydra/body))))) - -(use-package ctrlf - :init (ctrlf-mode +1)) - ;;; Windows @@ -943,11 +947,6 @@ (evil-ex-define-cmd "pesh[ell]" #'projectile-run-eshell) (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 @@ "v" #'split-window-right "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
M user/settings/emacs.nix → user/settings/emacs.nix
@@ -91,9 +91,7 @@ company-shell consult consult-eglot counsel - counsel-projectile crux - ctrlf dired-git-info envrc editorconfig