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

Theme Changes to better align with Visual Studio Light and Dark themes #92965

Closed
JoeRobich opened this issue Mar 18, 2020 · 7 comments
Closed
Assignees
Labels
feature-request Request for new features or functionality themes Color theme issues
Milestone

Comments

@JoeRobich
Copy link
Member

I recently experimented with adding a semantic token provider to the C# extension (dotnet/vscode-csharp#3667). This made apparent that the VS Code Light+ and Dark+ themes need to be updated so that the out of the box experience with semantic classification closely aligns with the default Visual Studio Light and Dark themes.

These are the changes I made to get an experience that was consistent with the Visual Studio default themes:

 "editor.tokenColorCustomizations": {
        "[Default Dark+]": {
            "textMateRules": [
                {
                    "scope": "entity.name.namespace",
                    "settings": {
                        "foreground": "#D4D4D4"
                    }
                },
                {
                    "scope": "entity.name.variable.field",
                    "settings": {
                        "foreground": "#D4D4D4"
                    }
                },
                {
                    "scope": "variable.other.property",
                    "settings": {
                        "foreground": "#D4D4D4"
                    }
                },
                {
                    "scope": "variable.other.constant",
                    "settings": {
                        "foreground": "#D4D4D4",
                    }
                },
                {
                    "scope": "variable.other.enummember",
                    "settings": {
                        "foreground": "#D4D4D4"
                    }
                },
                {
                    "scope": "entity.name.type.interface",
                    "settings": {
                        "foreground": "#b8d7a3"
                    }
                },
                {
                    "scope": "entity.name.type.enum",
                    "settings": {
                        "foreground": "#b8d7a3"
                    }
                },
                {
                    "scope": "entity.name.type.parameter",
                    "settings": {
                        "foreground": "#b8d7a3"
                    }
                },
                {
                    "scope": "storage.type.struct",
                    "settings": {
                        "foreground": "#86C691",
                    }
                },
                {
                    "scope": "entity.name.function.extension",
                    "settings": {
                        "foreground": "#DCDCAA",
                    }
                }
            ]
        },
        "[Default Light+]": {
            "textMateRules": [
                {
                    "scope": "entity.name.namespace",
                    "settings": {
                        "foreground": "#222222"
                    }
                },
                {
                    "scope": "entity.name.variable.field",
                    "settings": {
                        "foreground": "#222222"
                    }
                },
                {
                    "scope": "variable.other.property",
                    "settings": {
                        "foreground": "#222222"
                    }
                },
                {
                    "scope": "variable.other.constant",
                    "settings": {
                        "foreground": "#222222",
                    }
                },
                {
                    "scope": "variable.other.enummember",
                    "settings": {
                        "foreground": "#222222"
                    }
                },
                {
                    "scope": "entity.name.type.interface",
                    "settings": {
                        "foreground": "#267f99"
                    }
                },
                {
                    "scope": "entity.name.type.enum",
                    "settings": {
                        "foreground": "#267f99"
                    }
                },
                {
                    "scope": "entity.name.type.parameter",
                    "settings": {
                        "foreground": "#267f99"
                    }
                },
                {
                    "scope": "storage.type.struct",
                    "settings": {
                        "foreground": "#267f99",
                    }
                },
                {
                    "scope": "entity.name.function.extension",
                    "settings": {
                        "foreground": "#795E26",
                    }
                }
            ]
        }
    },

With Textmate Classification:
image

With Semantic Classification:
image

With Semantic Classification and Visual Studio 2019 theme tweaks:
image

@vscodebot
Copy link

vscodebot bot commented Mar 18, 2020

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@aeschli aeschli self-assigned this Mar 18, 2020
@JoeRobich
Copy link
Member Author

For reference
VisualStudio 2019 Windows:
image

VisualStudio for Mac (8.5 preview):
image

@aeschli
Copy link
Contributor

aeschli commented Mar 27, 2020

I added the rules for "entity.name.function.extension". That's an easy one.

The other suggested changes are more controversial. Changes in out default themes have always led to many negative reactions, to the extend that we even had to revert them.
Being 1:1 on par with the original VS is not our main objective. It's very easy to add new themes and make the available in the marketplace and there are infact themes mimicking the VS 2019 theme ans so on.
That said, I'd like to bring in a different color for const variables to take advantage of the semantic highlighting capabilities. I'll play around with your suggestion and get back to you.

@aeschli
Copy link
Contributor

aeschli commented Mar 27, 2020

entity.name.function.extension" as already covered by the entity.name.function. rule, e.g. for dark+ but the same for light+, and hc:
https://github.com/microsoft/vscode/blob/master/extensions/theme-defaults/themes/dark_plus.json#L9
So no change needed for that.

@aeschli aeschli added themes Color theme issues feature-request Request for new features or functionality labels Mar 27, 2020
@aeschli aeschli added this to the Backlog milestone Mar 27, 2020
@JoeRobich
Copy link
Member Author

Changes in out default themes have always led to many negative reactions, to the extend that we even had to revert them.

Thanks for considering these suggestions. As someone who has changed the VS theme for C# & VB I totally understand.

That said, I'd like to bring in a different color for const variables to take advantage of the semantic highlighting capabilities

When adding the "enhanced" 2019 theme for C# and VB I tried to make a differentiation between local (blue color) and member (text color) identifiers. Const was tricky for us because we didn't have the TokenModifiers concept. Hopefully when VS implements a similar classification scheme we won't have a single const color anymore.

@aeschli
Copy link
Contributor

aeschli commented Apr 15, 2020

I change our default to use the default color for const.

For now I want to leave it at that and see what the reactions are.

@aeschli
Copy link
Contributor

aeschli commented Apr 15, 2020

Closing as no further changes planed.

@aeschli aeschli closed this as completed Apr 15, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality themes Color theme issues
Projects
None yet
Development

No branches or pull requests

2 participants