vscode-cpptools
vscode-cpptools copied to clipboard
Ignore file watcher events for paths in files.exclude
Environment
n/a
Bug Summary and Steps to Reproduce
DefaultClient.registerFileWatcher registers a watcher for the workspace and we send file create/delete/change events to cpptools when they happen.
However, I'm seeing that we receive events for changes to the .git folder which is in the default files.exclude list. This creates a bit of noise for the extension. We should update the file watcher to discard events for files that we don't care about. files.exclude should be honored and I think C_Cpp.files.exclude should too. I am aware that there is files.watcherExclude, but by default it has a different pattern than files.exclude for some reason and doesn't cover the entire .git folder.
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/.hg/store/**": true
},
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true
}
Configuration and Logs
n/a
Other Extensions
No response
Additional context
No response
I agree with you. I realized of something similar.
On the other hand, I'm stuck with a feature. Do you mind taking a look at #11609 please? Maybe there is a solution that i don't know.
Regards.
please
bobbrow 已将这个从 Pull Request 移动到 1.21 中的 Done
Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/v1.21.0