Variable: projectile-search-use-ripgrep

projectile-search-use-ripgrep is a customizable variable defined in projectile.el.

Value

t

Documentation

Whether projectile-search-review accelerates literal search with ripgrep.

When non-nil (the default) a literal projectile-search-review scan uses ripgrep (rg) to find matches when the rg executable is available, which returns near-instantly even on a large project; otherwise, and always for the regexp search command and for every part of the replace reviewer, the portable pure-Emacs-Lisp scan is used.

The ripgrep fast-path's result set follows ripgrep's own ignore rules
(.gitignore, .ignore, hidden-file handling, and so on) plus
Projectile's ignore globs (.projectile and the globally-ignored files and directories, passed to rg via --glob), and skips matches in files that aren't valid UTF-8, so it can differ slightly from the pure-elisp path's projectile-dir-files set (for example in how hidden files or symlinks are treated). This is an accepted trade-off for speed; set this to nil to force the elisp scan, whose result set matches Projectile's ignore configuration exactly.

The regexp search command always uses the elisp scan (ripgrep's regex syntax is not Emacs regexp syntax), and the whole replace reviewer always uses the elisp scan (its write-back needs the exact buffer positions the elisp scan records). A command that knows a ripgrep-syntax equivalent of its Emacs regexp can opt into the fast-path anyway, which is what projectile-todos does. In batch mode (noninteractive) the elisp scan is used so scripted runs stay deterministic.

This variable was added, or its default value changed, in projectile version 3.2.0.

Source Code

;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defcustom projectile-search-use-ripgrep t
  "Whether `projectile-search-review' accelerates literal search with ripgrep.
When non-nil (the default) a literal `projectile-search-review' scan
uses ripgrep (`rg') to find matches when the `rg' executable is
available, which returns near-instantly even on a large project;
otherwise, and always for the regexp search command and for every part
of the replace reviewer, the portable pure-Emacs-Lisp scan is used.

The ripgrep fast-path's result set follows ripgrep's own ignore rules
\(`.gitignore', `.ignore', hidden-file handling, and so on) plus
Projectile's ignore globs (`.projectile' and the globally-ignored files
and directories, passed to `rg' via `--glob'), and skips matches in files
that aren't valid UTF-8, so it can differ slightly from the pure-elisp
path's `projectile-dir-files' set (for example in how
hidden files or symlinks are treated).  This is an accepted trade-off for
speed; set this to nil to force the elisp scan, whose result set matches
Projectile's ignore configuration exactly.

The regexp search command always uses the elisp scan (ripgrep's regex
syntax is not Emacs regexp syntax), and the whole replace reviewer always
uses the elisp scan (its write-back needs the exact buffer positions the
elisp scan records).  A command that knows a ripgrep-syntax equivalent of
its Emacs regexp can opt into the fast-path anyway, which is what
`projectile-todos' does.  In batch mode (`noninteractive') the elisp scan
is used so scripted runs stay deterministic."
  :group 'projectile
  :type 'boolean
  :package-version '(projectile . "3.2.0"))