Open codeitlikemiley opened 1 month ago
I saw this https://github.com/zed-industries/zed/blob/main/crates/languages/src/rust/highlights.scm
I manage to made progress on some of the available tokens
Rust Theme Settings
Thats is how far as I can get changing the theme so .. I manage to change a bunch as shown on the settings
Im wondering why we cant do something like
"keyword.enum": {
"color": "#b681ef",
"font_style": null,
"font_weight": null
}
Hope This would be added in near future...
imo there should be at least some debug mode where you can hover over (or right-click) a text element in the buffer and let it tell you which exact setting of the theme is affecting this element. Right now it's mostly guesswork whatever I have to override in the settings to get the desired look.
In C++ member functions should also not have to share their color value with editor.foreground
when there already is a function
type for syntax highlighting
Also hint.background
and hint.border
should actually do something... anything
After a few thousand lines the theming engine seems to break regardless of anything:
In this example see how SqlStatementID is suddenly treated differently for no apparent reason?
Also note how the string literal in CreateStatement("...
is just white text, when it should be green. Switching themes does not change that these sections are miscolored
Check for existing issues
Describe the feature
Is it possible to do the same theme customization like on vscode?
I would like to make a distinction between Traits , Enums, Structs and Union.
If applicable, add mockups / screenshots to help present your vision of the feature
see Example settings on Vscode, If Zed is using Tree Sitter then this is possible ... But Yeah there is a little info on how to create a custom theme , I would like to create one that would easily let me see different Class name for structs, enums, traits... as it is for me important :)
See Example Settings
``` "editor.tokenColorCustomizations": { "[Default Dark Modern]": { "textMateRules": [ { "scope": [ "keyword.other.rust", "support.type", "support.type.primitive", ], "settings": { "foreground": "#569CD6" } }, // Trait { "scope": [ "entity.name.type.trait.rust" ], "settings": { "foreground": "#b681ef" } }, // Enum, Struct, Union { "scope": [ "entity.name.type.struct.rust", "entity.name.type.union.rust", "variable.other.property", "variable.other.member" ], "settings": { "foreground": "#4EC9B0" } }, { "scope": [ "entity.name.type.enum.rust", // "variable.other.enummember.rust" ], "settings": { "foreground": "#eca4c3" } }, // Namespace { "scope": [ "entity.name.namespace" ], "settings": { "foreground": "#ffffffb2" } }, // Functions and Type Declarations { "scope": [ "entity.name.type.declaration.rust", "entity.name.function.rust" ], "settings": { "foreground": "#DCDCAA" } }, // Properties // Lifetimes and Parameters { "scope": [ "storage.modifier.lifetime.rust", "variable.parameter" ], "settings": { "foreground": "#ed5c5c" } }, // Comments { "scope": [ "comment" ], "settings": { "fontStyle": "italic" } }, ] }, }, ```
See currently on Zed:
On Vs Code: