garytyler / vscode-darcula-pycharm-theme

:vs: VS Code port of PyCharm's Darcula syntax theme w/ :high_brightness:Light & :stars:Dark GUI options, :tophat:MagicPython support, Jinja & Django template support, and overridable base highlight
14 stars 3 forks source link

Fix __name__ color. #4

Open PotatoWatch opened 3 years ago

PotatoWatch commented 3 years ago

It's blinding me right now. image

It should look more like this I think: image

If not, just make the purple not as bright. Thanks.

garytyler commented 3 years ago

Hey, sorry for taking a few weeks to respond. I agree with you about this, but since that is the color that Pycharm uses I decided to just make it possible to override the theme tokens in your VS Code settings. Try adding the following snippet to your settings.json file and you should be able to set the color to whatever you want!

"editor.tokenColorCustomizations": {
    "[Darcula Pycharm with Dark GUI]": {
        "textMateRules": [
            {
                "name": "Python magic method variable",
                "scope": [
                    "source.python support.variable.magic",
                ],
                "settings": {
                    "foreground": "#9E419E", // Low-contrast purple
                }
            },
        ]
    },
    "[Darcula Pycharm with Light GUI]": {
        "textMateRules": [
            {
                "name": "Python magic method variable",
                "scope": [
                    "source.python support.variable.magic",
                ],
                "settings": {
                    "foreground": "#9E419E", // Low-contrast purple
                }
            },
        ]
    },
},
PotatoWatch commented 3 years ago

@garytyler Thanks for responding! I'm a little bit lose on how to add it to the settings.json file in VSCode. Could you please explain it a little bit? Thanks!

garytyler commented 3 years ago

@PotatoWatch To edit your settings.json, press F1 in VS Code then type "open settings (json)" and select that option. Paste the snippet in there. It'll need to go in between the outermost curly braces. See what is json?. Let me know how it goes.

Also, I have a correction. You're right about this not being the correct color for the module level __name__ variable and it looks like this can probably be fixed in the project, so let's leave this issue open and I will get to it when I have a chance. For now, using the editor.tokenColorCustomization override in settings.json is the best solution.

PotatoWatch commented 3 years ago

Thanks!