Currently Code has special knowledge of some folders that shouldn't be looked in, such as:
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/**": true
},
For the same reason that these folders are in there, extensions may wish to contribute their own folders (for example we'd like to exclude the .dart_tool folder).
As far as I can tell, this isn't currently possible. I tried adding it to configurationDefaults in package.json in the hope I'd be merged with that object but it just seems to have no effect.
Is there a way that I can provide values to be added to files.watcherExclude, files.exclude, search.exclude?
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
@DanTup Why don't you update the setting when your extension is activated?
@sandy081 That could work, though it has some drawbacks:
files.watcherExcludes, files.ignore, search.ignore; esp. if we need to include all the defaults too, since the value gets replaced, not merged?)I think it'd be better if extensions could declare these in package.json and VS Code merges them all at startup (I guess it already reads the manifests at startup for commands, etc.). node_modules currently gets special treatment that other projects can't have.
Supporting overriding configuration defaults might need adoption from all those settings which need restart. Because, they might go in a loop when there is a change in configuration value due to defaults change.
Second this, https://github.com/redhat-developer/vscode-java/issues/618
We also have similar request to hide some files for Java language specifically. But this files.exclude cannot be enabled on package.json.
Java users have been complaining about the temporary files generated for handling a project. The temp files can be generated at any stage and can change as long as users change project settings. Restarting everytime does not look appealing. So we really need vscode to address this issue for us to hide those temp files without reloading window.
I guess there's no chance of this ever being implemented?
The referenced issue has been closed.
A real shame, I'd really like to hide some stuff my language compiler spits out.
Most helpful comment
@sandy081 That could work, though it has some drawbacks:
files.watcherExcludes,files.ignore,search.ignore; esp. if we need to include all the defaults too, since the value gets replaced, not merged?)I think it'd be better if extensions could declare these in package.json and VS Code merges them all at startup (I guess it already reads the manifests at startup for commands, etc.).
node_modulescurrently gets special treatment that other projects can't have.