Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix __name__ color. #4

Open
PotatoWatch opened this issue Jul 8, 2021 · 4 comments
Open

Fix __name__ color. #4

PotatoWatch opened this issue Jul 8, 2021 · 4 comments

Comments

@PotatoWatch
Copy link

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
Copy link
Owner

garytyler commented Jul 30, 2021

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
Copy link
Author

PotatoWatch commented Jul 30, 2021

@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
Copy link
Owner

@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
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants