-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Header-only IntelliSense should use language ID delivered with didOpen
instead of defaulting to C++
#9138
Comments
Hi @JAicewizard . By default, when a I believe you could work around the issue if you add a Does that resolve your issue? |
Hi @JAicewizard . Thanks. We'll use this issue to track addressing that. In the meanwhile, it would also be possible to work around the issue by setting a file association in settings, like so:
|
didOpen
instead of defaulting to C++
Yup this seems to work, even though vscode is now telling me it is in C++ mode, the c/c++ extension seems to be in C mode now. |
Yeah, it seems like we may not be responding correctly to C versus C++ language mode changes from the status bar. I filed an issue at #9141 . |
I believe this issue is currently blocked due to needing support from VS Code to correctly determine whether the user has altered the language ID of the file or if the default should be used. microsoft/vscode#227643 |
Bug type: Language Service
Describe the bug
void z(char *restrict q);
which is valid C code. Language is set to C.Steps to reproduce
Expected behavior
No squiggly lines
Code sample and logs
Configurations in
c_cpp_properties.json
Logs from running
C/C++: Log Diagnostics
from the VS Code command paletteThe text was updated successfully, but these errors were encountered: