Commit 682200a42f25

Vincent Demeester <vincent@sbr.pm>
2022-09-06 22:27:10
tools/emacs: add ugrep (to try)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent efcb6a7
Changed files (3)
tools
emacs
users
vincent
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)
users/vincent/core/default.nix
@@ -29,6 +29,7 @@ in
       ncurses
       pciutils
       ripgrep
+      ugrep
       scripts
       tree
       usbutils
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