Incompatible language mode error for c files not accounted for in CMakeLists.txt. #12124
Labels
bug
Feature: Configuration Provider
Related to the configurationProvider property, e.g. ms-vscode.cmake-tools, ms-vscode.makefile-tools.
Language Service
Milestone
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
is applied and a .c file is not accounted for in CMakeLists.txt, VsCode supplies the following error at the start of the c file:Removing the configuration provider setting solves the issue, but then VsCode does not recognize include directories set by my CMakeLists.
A workaround to this is to create a dummy target in CMakeLists.txt that isn't actually used:
Another potential untested workaround is to remove the configuration provider setting and recreate the configuration in vscode settings.json.
Both workarounds cause confusion and multiple touch points whenever relevant changes are introduced.
Steps to reproduce:
Reproduction Notes:
Expected behavior:
Configuration and Logs
Other Extensions
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: