VSCode Syntax Highlighting does not match configuration

NCS 2.7.0  with Toolchain 2.7.0

I'm working on an out of tree application derived from the example application project.

I'm using sysbuild with MCUBOOT.

The processor is NRF52840.

For some reason the text/syntax highlighting doesn't match the configuration.  Tooltips when I hover over a preprocessor MACRO are correct but the text highlighting doesn't match.

In this example, you can see the tooltip shows CONFIG_BSP_OP_STATE is 1 but the code highlighting shows the corresponding code as grey/disabled.

I suspect this has something to do with intellisense and the configuration provider.

this is my c_cpp_properties.json:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "cl.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-msvc-x64"
        }
    ],
    "version": 4
}

Parents
  • Hello,

    This highlighting is, unfortunately, not always correct. Particularly the IS_ENABLED() macro is something it struggles with. I will report it to our VS Code extension developers, but in general it struggles when there is not really a project file that you are working with, which is the case in the nRF Connect SDK. So most of us actually turn it off. 

    But I will report it. Thank you for reporting it to us Slight smile

    Best regards,

    Edvin

Reply
  • Hello,

    This highlighting is, unfortunately, not always correct. Particularly the IS_ENABLED() macro is something it struggles with. I will report it to our VS Code extension developers, but in general it struggles when there is not really a project file that you are working with, which is the case in the nRF Connect SDK. So most of us actually turn it off. 

    But I will report it. Thank you for reporting it to us Slight smile

    Best regards,

    Edvin

Children
No Data
Related