Closed Timmmm closed 4 months ago
@Timmmm C_Cpp.codeAnalysis.exclude
only applies to the "code analysis" (i.e. clang-tidy) feature and not "IntelliSense" or our tag parser. You should use C_Cpp.files.exclude
with an exclusion pattern that matches of folder. If you really need a per-file exclusion, then set C_Cpp.exclusionPolicy
to to "checkFilesAndFolders"
. Does that work for you?
Unfortunately not. With this settings.json
:
{
"C_Cpp.codeAnalysis.exclude": {
"${workspaceFolder}": true
},
"C_Cpp.files.exclude": {
"${workspaceFolder}": true
}
}
If I open foo.c
it still analyses it.
@Timmmm It looks like it doesn't work for that case. It works if you use the expanded path (not the variable) followed by /**
or if you use ${workspaceFolder}/someSubDir.
That doesn't seem to work either unfortunately:
Also tried these just to be sure:
@Timmmm The squiggles you're getting are not from the code analysis feature -- they're from IntelliSense. You can tell because IntelliSense errors have a number error code instead of a clang error code. You can turn off IntelliSense errors with the C_Cpp.errorSquiggles setting, but we don't have a per-file way to turn off the squiggles. Or you can turn off IntelliSense completely with C_Cpp.intelliSenseEngine set to "Tag Parser" or "disabled".
Ah I see - I turned this into a feature request: #12421
Or you can turn off IntelliSense completely with C_Cpp.intelliSenseEngine set to "Tag Parser" or "disabled".
Yeah I'd rather not lose intellisense for the rest of my project where it works fine.
Btw if anyone else is in this situation, I also tried switching to the Clangd extension and that seems to have no issues with the huge C files I'm working with. Worth a shot anyway.
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
C_Cpp.codeAnalysis.exclude
claims to exclude files from intellisense. I need this because I have a few 100k line generated C files in my project and every time I open themcpptools
gets stuck at 100% forever and I have to kill it.However, this setting doesn't seem to do anything.
Steps to reproduce:
.vscode/settings.json
containingfoo.c
containing:sdfsdf
, ctrl-clickfoo();
. It all still works. Clearly it is analysing the file.Expected behavior:
I guess syntax highlighting should still work but no errors should be highlighted and go-to-definition shouldn't work.
Configuration and Logs