Variable: magit-todos-scanner
magit-todos-scanner is a customizable variable defined in
magit-todos.el.
Value
magit-todos--scan-with-git-grep
Documentation
File scanning method.
"Automatic" will attempt to use rg, ag, git-grep, and
find-grep, in that order.
Source Code
;; Defined in /nix/store/xy37aj9089qvbs5clw0qszpi3hrh3mxx-emacs-packages-deps/share/emacs/site-lisp/elpa/magit-todos-20250928.1611/magit-todos.el
(defcustom magit-todos-scanner nil
"File scanning method.
\"Automatic\" will attempt to use rg, ag, git-grep, and
find-grep, in that order."
:type '(choice (const :tag "Automatic" nil)
(function :tag "Custom function"))
:set (lambda (option value)
(when magit-todos-scanners
;; Only try to set when scanners are defined.
(unless value
;; Choosing automatically
(setq value (or (magit-todos--choose-scanner)
(progn
(display-warning 'magit-todos
"`magit-todos' was unable to find a suitable scanner. Please install \"rg\", or a PCRE-compatible version of \"git\" or \"grep\". Disabling `magit-todos-mode'."
:error)
(magit-todos-mode -1)
nil))))
(set-default option value))))