-
-
Notifications
You must be signed in to change notification settings - Fork 877
Ability to exclude certain files/folders from showing #2471
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
Comments
You have a couple options to accomplish this.
|
|
I wouldn't call it arbitrary... The If you want to use |
rg has a flag for this, ... For context, the ripgrep decision is e.g. BurntSushi/ripgrep#1229 and the underlying reason for ripgrep doing this is, IMO, a ripgrep bug: ripgrep will look up your |
I wasn't aware of that flag 👍 I do agree with burntsushi although maybe not to the same degree.
With this flag you can also pass a require'telescope'.setup{
defaults = {
-- ...
},
pickers = {
find_files = {
find_command = { "rg", "--files", "--color", "never", "--no-require-git" }
}
}
-- ...
} |
Thank you for all the help, there seem to be 3 main solutions:
I think that the option (and possibly default) to use the |
With require'telescope'.setup{
defaults = {
-- ...
},
pickers = {
find_files = {
find_command = { "fd", "--type", "f", "--color", "never", "--no-require-git" }
}
}
-- ...
} |
Working, thx! |
Is your feature request related to a problem? Please describe.
I'm always frustrated when I try to find a file in my small project but am sifting though loads of files that were generated with
meson build
this may be solvable if I search git files instead of filesystem files but I do not think a should have to create a local git repo just to avoid all of my meson build files from showingDescribe the solution you'd like
A predefined list of files/folders that should be ignored and possibly with certain conditions like the
build/
folder should only be ignored if the folder it is in has ameson.build
but with the option for users to override these settings either in their neovim configs or a local file in the directory where they would like a file to be shown/hidden you could also add a custom command to show just the files telescope has hiddenDescribe other solutions you've considered
init.lua
.telescopeignore
to ignore these files.gitignore
I think all of these solutions have their cons, excluding files in the
init.lua
could clutter user configs with files that should be in their personal projects and is another thing users would have to configure despite - in my opinion - hiding binary files/buildfiles should be a saner default, adding a .telescopeignore file is another file to have to add and again users must configure it themselves, and as for using the.gitignore
file this seems silly after I said that the reason I did not want to use git_files was because not all my folders are git reposThe text was updated successfully, but these errors were encountered: