summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--emacs/custom/fcuny-navigation.el23
1 files changed, 23 insertions, 0 deletions
diff --git a/emacs/custom/fcuny-navigation.el b/emacs/custom/fcuny-navigation.el
index 49309a5..42027fd 100644
--- a/emacs/custom/fcuny-navigation.el
+++ b/emacs/custom/fcuny-navigation.el
@@ -70,6 +70,29 @@
 
 (use-package rg
   :ensure t
+  :config
+  (rg-define-search fcuny/grep-git-or-dir
+    :query ask
+    :format regexp
+    :files "everything"
+    :confirm prefix
+    :flags ("--hidden -g !.git")
+    :dir (let ((vc (magit-toplevel)))
+           (if vc
+               vc
+             default-directory)))
+  (rg-define-search fcuny/grep-git-or-dir-todos
+    :query "TODO\|FIXME\|XXX"
+    :format regexp
+    :files "everything"
+    :confirm prefix
+    :flags ("--hidden -g !.git")
+    :dir (let ((vc (magit-toplevel)))
+           (if vc
+               vc
+             default-directory)))
+  :bind (("M-s g" . fcuny/grep-git-or-dir)
+         ("M-s t" . fcuny/grep-git-or-dir-todos))
   :custom
   (rg-group-result t)
   (rg-show-columns t)