commit 682200a42f258c1d1ef97b7fb76695440f8afdc5
parent efcb6a7b42082242bc78fd207fd921f054d589c4
Author: Vincent Demeester <vincent@sbr.pm>
Date: Tue, 6 Sep 2022 22:27:10 +0200
tools/emacs: add ugrep (to try)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
3 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/emacs/config/config-search.el b/tools/emacs/config/config-search.el
@@ -59,6 +59,16 @@ confines of word boundaries (e.g. multiple words)."
("M-s d" . find-grep-dired))
:hook ((hook-mode . toggle-truncate-lines))
:config
+ (setq-default grep-template (string-join '("ugrep"
+ "--color=always"
+ "--ignore-binary"
+ "--ignore-case"
+ "--include=<F>"
+ "--line-number"
+ "--null"
+ "--recursive"
+ "--regexp=<R>")
+ " "))
(add-to-list 'grep-find-ignored-directories "auto")
(add-to-list 'grep-find-ignored-directories "elpa"))
;; -UseGrep
@@ -94,9 +104,7 @@ confines of word boundaries (e.g. multiple words)."
"rg"
(format "rg: %s" (projectile-project-name))))
(t "rg")))
- (setq rg-buffer-name #'vde/rg-buffer-name)
- (with-eval-after-load 'projectile
- (defalias 'projectile-ripgrep #'rg-project)))
+ (setq rg-buffer-name #'vde/rg-buffer-name))
;; -UseRG
(provide 'config-search)
diff --git a/users/vincent/core/default.nix b/users/vincent/core/default.nix
@@ -29,6 +29,7 @@ in
ncurses
pciutils
ripgrep
+ ugrep
scripts
tree
usbutils
diff --git a/users/vincent/dev/emacs.nix b/users/vincent/dev/emacs.nix
@@ -149,6 +149,7 @@ in
pandoc
sqlite
zip
+ ugrep
# See if I can hide this under an option
capture
ec