-
Notifications
You must be signed in to change notification settings - Fork 28.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make --no-config for ripgrep optional #149727
Comments
Sorry, we can't do this. We have to use ripgrep in a specific configuration, and changing that could break vscode's integration with it. In my view, the ripgrep config file is for a user using ripgrep directly. You can add excluded files to a |
We are not using a plain .ignore file, so for my use case, that might be an option. I'll give that a go. |
Ah, no, it won't help, since the files.exclude is always read it seems. So, I think I would need a split in that particular setting.
In my case I would only select options 2 and 3, leaving the long list of file.exclude settings out of the equation.... I think from the code I read that ripgrep itself is reading the ignore files, so we should probably be ok with it using that. Can't see how to re-open the case. If that's not possible, I'll add a new one.... |
I do have #98514 open for this same issue. Not sure what you are asking for, I guess you still want to use files.exclude to hide folders in vscode but the presence of that setting breaks search? How many patterns do you have? |
I have about 1000 patters in the files.exclude setting. I'm constructing that list from a code-owners file in a mono repository, filtering between all files and only files/folders a team owns. And yes, I'd like to have those files excluded in vscode and preferably be able to switch between searching all files and only the owned files. But, these 1000 patterns break ripgrep. I guess it would work if I could maintain a .ignore file from my extension. So, a setting to not add the excluded files in the search command would probably fix it for me. |
In
src\vs\workbench\services\search\node\ripgrepFileSearch.ts:74
there is a command line flag for ripgrep to exclude any defined config files for ripgrep
args.push('--no-config');
Can using this argument be made optional through a setting? There are use cases where users would want to have some settings in the config file to apply.
FYI: I'm asking this question because I have a lot of excluded folders (managed by my own extension) in my vscode files.exclude setting, which causes the ripgrep command to fail because of the lenght of the command for all the added ignored folders. I want to add these excluded files to a ripgrep configuration file, but due to the mentioned code that configuration is ignored.
The text was updated successfully, but these errors were encountered: