When both .c and .cpp files are in the same folder, the extension uses the fallback flags of the language that first wakes the clangd extension. A manual restart of the language server is required when switching between files of different languages in the same workspace.
Add Language-Specific Overrides for
clangd.fallbackFlags
I think it'll be helpful for single file hints
Example configuration:
Current Limitation:
When both
.c
and.cpp
files are in the same folder, the extension uses the fallback flags of the language that first wakes theclangd
extension. A manual restart of the language server is required when switching between files of different languages in the same workspace.