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
Use ThemeColor and add support for light themes #1299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
editors/code/package.json
Outdated
} | ||
}, | ||
{ | ||
"id": "ralsp.control", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an easy way to allow both
- highligting all keywords the same (this is what I personally prefer)
- highlight various different classes of keywords differently
Perhaps we should just name classes ralsp.keyword
, ralsp.keyword.controlflow
, ralsp.keyword.unsafe
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. I used ralsp.keyword.control
to match the default theme (keyword.control
).
editors/code/package.json
Outdated
"id": "ralsp.keyword", | ||
"description": "Color for keywords", | ||
"defaults": { | ||
"dark": "#F0DFAF", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I'd be perfectly fine with picking a color from default dark theme. This is now configurable, so I can just specify zenburn colors in my config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to the default colors.
@@ -11,6 +11,14 @@ pub struct HighlightedRange { | |||
pub tag: &'static str, | |||
} | |||
|
|||
fn is_control_keyword(kind: SyntaxKind) -> bool { | |||
match kind { | |||
FOR_KW | LOOP_KW | WHILE_KW | CONTINUE_KW | BREAK_KW | IF_KW | ELSE_KW | MATCH_KW |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new syntax for this is
match kind {
T![for], T![loop], ...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that better? 😅
Updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is, but the beauty is in the eye of the beholder :)
Thanks! bors r+ |
Build succeeded |
}, | ||
{ | ||
"id": "ralsp.macro", | ||
"description": "Color for DFAF8F", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't be it Color for macros
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, fixed in #1305.
Part of #1294.
ThemeColor
unsafe