theme-converter-for-vs icon indicating copy to clipboard operation
theme-converter-for-vs copied to clipboard

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

Open NicolasFirmo opened this issue 2 years ago • 12 comments

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"
                    },
                },
            ]
        },
  1. 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.

NicolasFirmo avatar Jun 27 '22 04:06 NicolasFirmo

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

kwisatzhaderech avatar Jul 25 '22 11:07 kwisatzhaderech

I have the same problem with OneDarkPro.

nobushi95 avatar Aug 08 '22 07:08 nobushi95

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 avatar Sep 03 '22 19:09 DavidBChristensen

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 avatar Sep 03 '22 20:09 DavidBChristensen

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

DavidBChristensen avatar Sep 04 '22 00:09 DavidBChristensen

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.

zx-lhb avatar Feb 10 '23 01:02 zx-lhb

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

ismaarino avatar Feb 21 '23 12:02 ismaarino

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

Dangcaominh avatar Jul 27 '23 03:07 Dangcaominh

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!

Dangcaominh avatar Jul 27 '23 12:07 Dangcaominh

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?

aremmell avatar Sep 21 '23 08:09 aremmell

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.

DavidBChristensen avatar Sep 21 '23 18:09 DavidBChristensen

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 😭

aremmell avatar Sep 22 '23 01:09 aremmell