-
Notifications
You must be signed in to change notification settings - Fork 29k
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
Do not include git files in search results #85915
Comments
Yup that's pretty ugly, I seen it too. This is a consequence of using a FileSystemProvider for git, instead of the TextDocumentContentProvider API. cc @eamodio @bpasero I wonder if we can filter out search documents based on URI scheme, @roblourens? |
Should I specifically exclude the I could ignore docs with a scheme that doesn't match that of a workspace folder (but including untitled docs)? |
I think excluding git docs specifically might be the best fix, I don't want to make FileSystemProviders less useful by excluding their docs from search all the time. Or does it make any sense for a FileSystemProvider to declare whether it wants to be searched? |
👍 IMHO the safest change so late is to exclude git specifically. The best would be for a FileSystemProvider to opt-in/opt-out of searching. |
Agreed, thanks @roblourens! |
I think this problem isn't exclusive to the FileSystemProvider API because there many sources for editor model. @roblourens How does this work for other resources, like any document from a TextDocumentContentProvider, things like inmemory resources, or RHS diff editor etc? Why aren't they searched? |
I think that everything else is handled by if (!this.fileService.canHandleResource(resource)) {
return;
} |
Yeah - that should catch most of it but I also see special handling for untitled files and the |
You mean a search provider? Maybe. I don't know what all the different usecases of fs providers are and how many we want to search vs not search. I think we should probably search everything by default, exclude some things like this, and figure out what people complain about. |
This has started recently, and it is annoying for me:
The text was updated successfully, but these errors were encountered: