Inactive region colorization not working

While working on a project in platformio, in a tooltip like the one in the image, I accidentally turned off the highlighting of inactive code.

When I tried to turn the highlighting back on, it no longer worked correctly.
There are no problems in regular .cpp files. As you can see from the previous image. The function does not work only in platformio projects.
I deleted the VS Code folder in appdata + the .platformio folder + extensions folder in the User directory. But when I reinstalled everything, the highlighting was still broken for inactive code. Here are my settings. Any changes to the commented lines have no effect.

{
    "workbench.startupEditor": "none",
    "explorer.confirmDragAndDrop": true,
    "extensions.ignoreRecommendations": true,
    "git.enabled": false,
    "git.path": null,
    "git.autofetch": false,
    "window.zoomLevel": -2,
    "editor.dragAndDrop": false,
    "editor.dropIntoEditor.enabled": false,

    // "C_Cpp.dimInactiveRegions": true,
    // "C_Cpp.inactiveRegionBackgroundColor": "#ffffff",
    // "C_Cpp.inactiveRegionForegroundColor": "#ffffff",
    // "C_Cpp.inactiveRegionOpacity": 0.55
}

Does anyone know how to fix this?

This is how the highlighting works in platformio

This is not about PlatformIO but VSCode and the C++ extention!

  1. Open settings (Ctrl +)
  2. Enter “dim inactive regions” in the filter line
  3. Activate the setting in both, workspace and user

1 Like

Thank you very much! I didn’t know about the workspace tab. Now it works!