-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
API: Support glob pattern "**/!(*.min).js" for file watchers #27051
Comments
Our glob patterns currently do not support negation. |
What do they support then? There is nothing in your documentation about how they're supposed to work. If they don't support something as fundamental to pattern matching as a negation operator, that needs to be far more obvious whether it be in the program, or in documentation. |
+1 on this, was wondering why my standard globs weren't working |
@jpike88 and @Xunnamius It looks like they have added it to the docs: https://code.visualstudio.com/docs/extensionAPI/vscode-api#GlobPattern |
Is there going to be future support for negation? E.g. I have a situation where I want a language client (which also uses VS Code APIs to match file globs) to conditionally send LSP traffic to a server, based on where the document that's involved lives in the file-system. See this code pointer. I would like to exclude certain subdirectories from my glob. Currently, to my understanding, I can't do this, unless I use per-character negation (as the vscode documentation indicates is supported), to do something like is mentioned in the following comment. |
cc: @bpasero |
What is the status on this issue? It would be very helpful to be able to exclude certain folders and files from the file watcher. I agree that having another parameter to specify exclusions would be one nice solution. |
Well, please reconsider. I've got a case where I need to exclude node_modules from source map lookups, but I've got my own module that I'm developing and this one needs to not be excluded. I think that it's a valid case and inability to negate path fragment from |
I am trying to write an extension, and I am wondering how I can take this pattern:
And use it here:
It seems as if the
!(*.min)
is not supported. It would be nice if either:A
!()
was supportedOR
B There is another parameter for ignoring files similar to
vscode.workspace.findFiles()
The text was updated successfully, but these errors were encountered: