microsoft / theme-converter-for-vs

CLI tool that allows you to convert your VS Code color theme to a VS 2022 color theme.
MIT License
515 stars 55 forks source link

Converted theme has the wrong colors (One Dark Pro Monokai Darker Reloaded Theme) #149

Open NicolasFirmo opened 2 years ago

NicolasFirmo commented 2 years ago

Describe the bug The converted theme has the wrong colors compared to Visual Studio Code. Most of the tokens are colored differently and the brackets are colored instead of default white.

Screenshots image image

To Reproduce Steps to reproduce the behavior:

  1. Install the One Dark Pro Monokai Darker Reloaded Theme from the Marketplace in Visual Studio Code
  2. Add the following lines inside "editor.tokenColorCustomizations" in settings.json in Visual Studio Code
        "[One Dark Pro Monokai Darker Reloaded]": {
            "textMateRules": [
                {
                    "scope": [
                        "storage.type.class",
                        "storage.type.struct",
                        "storage.type.modifier.access.control"
                    ],
                    "settings": {
                        "foreground": "#E06C75",
                        "fontStyle": ""
                    },
                },
                {
                    "scope": "keyword.control",
                    "settings": {
                        "foreground": "#BBBBBB"
                    },
                },
            ]
        },
  3. Execute the steps provided on using the tool in the README.md

Expected behavior The converted theme must have been colored in the exact same manner as the theme in Visual Studio Code

Environment:

Impact This demonstrates that the tool is converting but the resulting theme is not colored the same.

kwisatzhaderech commented 2 years ago

I have exactly same issue with Visual Assist Dark Theme. The converted theme has the wrong colors compared to Visual Studio Code.

nobushi95 commented 2 years ago

I have the same problem with OneDarkPro.

DavidBChristensen commented 2 years ago

I just wanted to note here that I was having the same issue, then the thought occurred to me that it might only work for C#. I opened a C# project, and sure enough that was the case.

So I guess what this issue is, is please support the C++ tokens as well.

DavidBChristensen commented 2 years ago

Okay, I took a look at the TokenMappings.json and I'll go ahead and add the Cpp* tokens. I don't use Resharper, so I'm not going to care about those.

At least the following need to be included as VS Tokens:

"Cpp Text Editor MEF Items&C/C++ User Keywords" "Cpp Text Editor MEF Items&CppClassTemplateSemanticTokenFormat" "Cpp Text Editor MEF Items&CppControlKeywordSyntacticTokenFormat" "Cpp Text Editor MEF Items&CppEnumSemanticTokenFormat" "Cpp Text Editor MEF Items&CppEventSemanticTokenFormat" "Cpp Text Editor MEF Items&CppFunctionSemanticTokenFormat" "Cpp Text Editor MEF Items&CppFunctionTemplateSemanticTokenFormat" "Cpp Text Editor MEF Items&CppGenericTypeSemanticTokenFormat" "Cpp Text Editor MEF Items&CppGlobalVariableSemanticTokenFormat" "Cpp Text Editor MEF Items&CppLabelSemanticTokenFormat" "Cpp Text Editor MEF Items&CppLocalVariableSemanticTokenFormat" "Cpp Text Editor MEF Items&CppMacroSemanticTokenFormat" "Cpp Text Editor MEF Items&CppMemberFieldSemanticTokenFormat" "Cpp Text Editor MEF Items&CppMemberFunctionSemanticTokenFormat" "Cpp Text Editor MEF Items&CppMemberOperatorSemanticTokenFormat" "Cpp Text Editor MEF Items&CppNamespaceSemanticTokenFormat" "Cpp Text Editor MEF Items&CppNewDeleteSemanticTokenFormat" "Cpp Text Editor MEF Items&CppOperatorSemanticTokenFormat" "Cpp Text Editor MEF Items&CppParameterSemanticTokenFormat" "Cpp Text Editor MEF Items&CppPropertySemanticTokenFormat" "Cpp Text Editor MEF Items&CppRefTypeSemanticTokenFormat" "Cpp Text Editor MEF Items&CppStaticMemberFieldSemanticTokenFormat" "Cpp Text Editor MEF Items&CppStaticMemberFunctionSemanticTokenFormat" "Cpp Text Editor MEF Items&CppStringDelimiterCharacterSyntacticTokenFormat" "Cpp Text Editor MEF Items&CppStringEscapeCharacterSyntacticTokenFormat" "Cpp Text Editor MEF Items&CppSuggestedActionFormat" "Cpp Text Editor MEF Items&CppTypeSemanticTokenFormat" "Cpp Text Editor MEF Items&CppUDLNumberSemanticTokenFormat" "Cpp Text Editor MEF Items&CppUDLRawSemanticTokenFormat" "Cpp Text Editor MEF Items&CppUDLStringSemanticTokenFormat" "Cpp Text Editor MEF Items&CppValueTypeSemanticTokenFormat" "Cpp Text Editor MEF Items&ReSharper C++ Class Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Struct Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Enum Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Union Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Namespace IdCpp Text Editor MEF Items&entifier" "Cpp Text Editor MEF Items&ReSharper C++ Local Variable Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Parameter Variable Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Global Variable Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Concept Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Class Field Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Struct Field Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Static Field Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Enum Enumerator Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Union Member Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Typedef Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Global Function Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Member Function Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Static Member Function Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Overloaded Operator Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Template Parameter Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Dependent Name IdCpp Text Editor MEF Items&entifier" "Cpp Text Editor MEF Items&ReSharper C++ Preprocessor Macro Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Preprocessor Macro Parameter Identifier" "Cpp Text Editor MEF Items&ReSharper C++ UE4 Reflection Specifier Identifier" "Cpp Text Editor MEF Items&ReSharper C++ Doxygen Command" "Cpp Text Editor MEF Items&ReSharper C++ String Literal" "Cpp Text Editor MEF Items&ReSharper C++ Character Literal" "Cpp Text Editor MEF Items&ReSharper C++ Integer Literal" "Cpp Text Editor MEF Items&ReSharper C++ Float Literal" "Cpp Text Editor MEF Items&ReSharper C++ UE4 Ini File Section" "Cpp Text Editor MEF Items&ReSharper C++ UE4 Ini File Key" "Cpp Text Editor MEF Items&ReSharper C++ UE4 Ini File Value Property"

DavidBChristensen commented 2 years ago

Okay, I finally got back home and did this. It works good enough for me to make a .vsix from my fork.

zx-lhb commented 1 year ago

oh, I have the same issue, it looks different in visual studio compared to vscode when using cpp. can it support cpp? please, i really love the dracula theme in vscode and i want to use it when editing cpp.

ismaarino commented 1 year ago

Same issue on c++ files, with the Railgun theme

Dangcaominh commented 1 year ago

Same issue on C++ file, C, xml, xaml and razor file with Cyberpunk 2077 theme.

Dangcaominh commented 1 year ago

Following DavidBChristensen's guide, I have succeeded in making it work for C++. But can anyone tell me how to get the VS Token like him ?? I would like to get all the VS token for all the language to further develop my theme. Many thanks!

aremmell commented 1 year ago

Can we get some activity on this? Lots of C++ developers out here stuck using VS2022 (against our will) for work and would really like at least the visual comforts of VS Code whilst we use our bloated IDE from 2008.

@DavidBChristensen maybe you can open a PR if you've figured out all the correct mappings? And perhaps you could reply to @Dangcaominh about how you found those mappings?

DavidBChristensen commented 1 year ago

Sure, I'll make a PR for what I've got. Unfortunately, I can't remember where I got those tokens from. I'll take a look later to see if I can "re-discover" that.

aremmell commented 1 year ago

Sure, I'll make a PR for what I've got. Unfortunately, I can't remember where I got those tokens from. I'll take a look later to see if I can "re-discover" that.

There's some in TokenMappings.json, but definitely not the entire list you posted. I spent 3 hours manually copying hex color codes into that block since Microsoft doesn't care about C++ anymore 😭