From 08a558ac1dd508d7af4de2d099f0d94c720f2e73 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 1 Aug 2020 18:26:26 +0100 Subject: +rg.el package to substitute for counsel-rg rg.el > counsel-rg Furthermore, rg.el is agnostic of counsel-rg. --- Emacs/.config/emacs/config.org | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'Emacs/.config/emacs') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index e5aea71..4d0c8b3 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -359,8 +359,7 @@ (use-package counsel :after (ivy helpful) :bind (("C-s" . counsel-grep-or-swiper) - ("C-x b" . counsel-switch-buffer) - ("M-s r" . counsel-rg)) + ("C-x b" . counsel-switch-buffer)) :config (setq ivy-initial-inputs-alist nil counsel-describe-function-function #'helpful-callable @@ -374,6 +373,26 @@ :after counsel :bind ("M-s t" . counsel-etags-find-tag)) #+END_SRC +* Ripgrep + The ripgrep package provides utilities to grep projects and files for strings via the rg tool. + Though [[*Ivy][ivy]] comes with =counsel-rg= using it makes me dependent on the ivy framework, and this configuration is intentionally built to be modular and switchable. + #+BEGIN_SRC emacs-lisp + (use-package rg + :after evil + :bind (("M-s r" . rg) + :map +evil/leader-map + ("r" . rg) + :map rg-mode-map + ("]]" . rg-next-file) + ("[[" . rg-prev-file)) + :init + (setq rg-group-result t + rg-hide-command t + rg-show-columns nil + rg-show-header t + rg-custom-type-aliases nil + rg-default-alias-fallback "all")) + #+END_SRC * Projectile ** Projectile default Setup projectile, along with the tags command. -- cgit v1.2.3-13-gbd6f