From e0dbc1ae591cc6a4cc587fed5be29061c5fa4dd8 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 8 Nov 2021 09:47:24 -0800 Subject: feat(wpcarro/emacs): Pass --{hidden,follow} flags to rg These are useful defaults. Change-Id: Ife4a7f559c9599ba3b846eea7e757266afd7ceae Reviewed-on: https://cl.tvl.fyi/c/depot/+/4805 Tested-by: BuildkiteCI Reviewed-by: wpcarro Autosubmit: wpcarro --- users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'users') diff --git a/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el b/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el index 58fc6a09c9f0..df0a7720f9b5 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el @@ -272,12 +272,11 @@ (setq deadgrep--additional-flags '("--multiline")) (wpc-misc-deadgrep-region) (call-interactively #'deadgrep)))) - (advice-add - 'deadgrep--format-command - :filter-return - (lambda (cmd) - (replace-regexp-in-string - "^rg " "rg --hidden " cmd)))) + (advice-add 'deadgrep--arguments + :filter-return + (lambda (args) + (push "--hidden" args) + (push "--follow" args)))) ;; TODO: Do I need this when I have swiper? (use-package counsel) -- cgit 1.4.1