38 lines
1.6 KiB
Org Mode
38 lines
1.6 KiB
Org Mode
:PROPERTIES:
|
|
:ID: cce/deadgrep
|
|
:ROAM_ALIASES: deadgrep ripgrep
|
|
:END:
|
|
#+TITLE: Deadgrep is a Great Grep Interface
|
|
#+filetags: :CCE:Emacs:Tool:
|
|
#+ARROYO_MODULE_WANTS: cce/configure_packaging.org
|
|
|
|
#+PROPERTY: header-args :mkdirp yes :results none
|
|
#+PROPERTY: header-args:emacs-lisp :tangle deadgrep.el
|
|
|
|
#+ARCOLOGY_KEY: cce/deadgrep
|
|
#+ARCOLOGY_ALLOW_CRAWL: t
|
|
|
|
#+ARROYO_HOME_MODULE: hm/deadgrep.nix
|
|
#+ARROYO_EMACS_MODULE: deadgrep
|
|
=ripgrep= is a regular expression searching [[id:a7420bb9-395f-4afa-92fb-8eaa0b8a4cd8][Tool]] written in [[id:13995d53-320a-4955-996a-4a4a25319701][Rust]]. =deadgrep= is a package which runs on top of it providing an [[id:cce/emacs][Emacs]] interface to =rg='s functionality. I have it bound to =C-x p a= in a [[id:cce/navigating_projects_with_projectile][Projectile]] [[id:cce/hydra][Hydra]]. I provide a "hack" to introduce some extra arguments to Deadgrep. While Wilfred is happy to commit and work on various issues, he [[https://github.com/Wilfred/deadgrep/issues/24][hasn't seemed too interested in solving this]]. So we [[roam:get out the emacs scalpel]].
|
|
|
|
#+begin_src emacs-lisp
|
|
(use-package deadgrep
|
|
:config
|
|
(defun deadgrep--hack-arguments (oldfun &rest rest)
|
|
(let ((res (apply oldfun rest)))
|
|
(append (list "--follow" "--glob" "!*~") res)))
|
|
(add-function :around (symbol-function 'deadgrep--arguments) #'deadgrep--hack-arguments))
|
|
(provide 'cce/deadgrep)
|
|
#+end_src
|
|
|
|
for [[id:c75d20e6-8888-4c5a-ac97-5997e2f1c711][NixOS]] [[id:cce/home-manager][Nix Home Manager]]:
|
|
|
|
#+begin_src nix :tangle ~/arroyo-nix/hm/deadgrep.nix
|
|
{pkgs,...}:
|
|
{
|
|
home.packages = [ pkgs.ripgrep ];
|
|
}
|
|
#+end_src
|