OneDark-Pro icon indicating copy to clipboard operation
OneDark-Pro copied to clipboard

Incorrect Colors for C++ Files in Visual Studio 2022

Open KingJordan152 opened this issue 3 years ago • 5 comments

In Visual Studio 2022, the theme does not work correctly for C++ files. The majority of keywords take on the coloring provided by the default Visual Studio dark theme. This seems to only be a problem with C++ files, as JavaScript and C# files look as expected. It could be a problem with the Theme Converter tool and how the theme was originally converted, since certain keywords get the proper highlighting while others don't.

C++ File in Visual Studio 2022 image Notice how functions are light yellow instead of blue and variables are light blue instead of red.

C++ File in Visual Studio Code (this is how I expect the Visual Studio 2022 version to look) image Correct function and variable colors.

Steps to reproduce the behavior:

  1. Download Visual Studio 2022 Community 17.1
  2. Install the official OneDark Pro theme from the Visual Studio Marketplace.
  3. Change your current theme to the OneDark Pro theme and open up a C++ file.

System Info:

  • OS: Windows 10
  • Version: Visual Studio 2022 Community 17.1
  • Theme version: 1.2.0

KingJordan152 avatar Feb 19 '22 05:02 KingJordan152

just released v1.3.0, plz check it~

Binaryify avatar Feb 19 '22 09:02 Binaryify

just released v1.3.0, plz check it~

It still has the incorrect color palette for C++ files.

KingJordan152 avatar Feb 19 '22 17:02 KingJordan152

you could create an issue in this repo https://github.com/microsoft/theme-converter-for-vs

Binaryify avatar Feb 20 '22 04:02 Binaryify

Hi! Are there any updates on this? @Binaryify if possible, can you edit the color in C++ section (in Fonts & Colors), then export that Fonts & Colors option into a .vssettings file so that we can import it? I would be eternally grateful~~~ Many thanks in advance! Please update if there's anything new for VS2022

chrisdcao avatar Mar 21 '22 05:03 chrisdcao

I believe python file seems to have the same issue. Some key words such as "is" and "not" do even have the color.

yudonglin avatar Apr 13 '22 17:04 yudonglin