doomemacs / doomemacs/core

Enable ripgrep to run on symbolic links when using +vertico-file-search

Open
#6,349 1 comment 2 reactions 1 assignee Claimed by @iyefrat View on GitHub
:completion vertico is:tweak
Dominant language
Emacs Lisp
Stars
22.7k
Forks
3.1k
Avg merge
10h 46m
Merged PRs (30d)
4

Description

### Describe your request

Currently `+vertical-file-search` function does not allow any customization of the search argument for ripgrep, as in the source code:
```
(consult-ripgrep-args
(concat "rg "
(if all-files "-uu ")
(unless recursive "--maxdepth 1 ")
"--null --line-buffered --color=never --max-columns=1000 "
"--path-separator / --smart-case --no-heading --line-number "
"--hidden -g !.git -g !.svn -g !.hg "
(mapconcat #'shell-quote-argument args " ")
" ."))
```
where the `consult-ripgrep-args` is always overwrited. currently there is no way to add option `-L` for searching in symbolic link.
I wonder if it will make sense to add a global variable like `rg-extra-args` where we can do something like:
```
(consult-ripgrep-args
(concat "rg "
(if all-files "-uu ")
(unless recursive "--maxdepth 1 ")
"--null --line-buffered --color=never --max-columns=1000 "
"--path-separator / --smart-case --no-heading --line-number "
"--hidden -g !.git -g !.svn -g !.hg "
(mapconcat #'shell-quote-argument args " ")
rg-extra-args
" ."))
```

### Briefly explain its use-case

1. default value of `rg-extra-args` is empty string `""`
2. configure `rg-extra-args` to have something like `-L` for symbolic link or any additional args for rg command
3. now you have things enabled as needed

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.