Make Doom search config with ripgrep, not git
Doom's package help uses `git grep` to search for files in Doom configuring a package, which does not work for us because our Doom install does not live in a Git checkout. Unfortunately this breaks package help completely because of error handling problems. Add advice to use ripgrep instead, which fixes package help. I don't like doing this: I've sent the same fix upstream, if it's not accepted there I may just make Doom in the Nix store be a Git checkout.
This commit is contained in:
parent
80e6ef0d25
commit
708e180792
1 changed files with 13 additions and 0 deletions
13
pre-init.el
13
pre-init.el
|
|
@ -18,5 +18,18 @@ it. Just skip it entirely."
|
|||
(after! doom-packages
|
||||
(setq straight-base-dir unstraightened--straight-base-dir))
|
||||
|
||||
;; TODO: remove if Doom accepts https://github.com/doomemacs/doomemacs/pull/7849
|
||||
(defadvice! nix-doom-configs-without-git (package)
|
||||
"Override to use ripgrep instead of git."
|
||||
:override #'doom--help-package-configs
|
||||
(let ((default-directory doom-emacs-dir))
|
||||
(split-string
|
||||
(cdr (doom-call-process
|
||||
"rg" "--no-heading" "--line-number" "--iglob" "!*.org"
|
||||
(format "%s %s($| )"
|
||||
"(^;;;###package|\\(after!|\\(use-package!)"
|
||||
package)))
|
||||
"\n" t)))
|
||||
|
||||
;; nix-doom-emacs-unstraightened additions end here.
|
||||
;; Original init.el follows.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue