diff options
author | Franck Cuny <franck@fcuny.net> | 2021-02-12 09:39:05 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2021-02-12 09:39:22 -0800 |
commit | 17bb229122768fa1fc601aaabca26909173f859e (patch) | |
tree | 3b64d6d2943f68b18e9a45d6c64b9edaa4a8f29d | |
parent | emacs: slight changes to theme settings (diff) | |
download | emacs.d-17bb229122768fa1fc601aaabca26909173f859e.tar.gz |
emacs: new defined search for rg
-rw-r--r-- | emacs/custom/fcuny-navigation.el | 23 |
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) |