Open Aleksandaar opened 4 weeks ago
I see where you are coming from with this :)
Can this not be achieved by the user through defining rgMenuActions
?
Or via rgQueryParams
?
If I were to rewrite Periscope (and even now), my general preference is to focus as much as possible on an open interface pattern where the users can manipulate their search criteria as much as they like and the extension is generic enough to handle it. All they would need to know are some basic patterns Periscope uses for the setup and the rest is their knowledge on ripgrep.
Currently the extension doesn't support all ripgrep possibilities due to the arrangement of the ripgrep arguments.
Heh, I also now see where are you coming from :D
You want it to be universal, and I could've added --glob "!**/tmp"
to the rgQueryParams
instead of generating it like in the image above.
Now I understood move what you meant, but sadly (again) I was mostly exploring the option of searching those files outside of default scope.
And sadly not really possible in that use case, as if you would want by default to look for all files you would have to --no-ignore
and see --hidden
files, but also by default
you would have to exclude some of the files/directories. You could exclude using rgQueryParams
, as you said, but you can't re-enable them using rgMenuActions
as excluding a folder from a search and then including it in the same command will not include it (I've tried it. It doesn't cancel each other out) - so had to have an option to "disable" some of the "excludes" rather than to "include" it afterwards.
I mean, everything could be done, but this seemed also a possible approach.
This is just an idea. As rg search respects
.gitignore
and similar files sometimes there could be a need to search the files and/or directories that are in the.gitignore
. There is an override to set the additional menu option--no-ignore
but it would search all folders, which sometimes could be too much.There could be an option for example to list all the files and folders in the rg menu by default, that are listed in
files.exclude
orsearch.exclude
in the VS Code, and users could disable one of those options when needed. For example it could look something like this:There could be an option to either respect
.gitignore
or VS Code's files.exclude option