-
Notifications
You must be signed in to change notification settings - Fork 636
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
Improper syntax highlighting #6323
Comments
component F {
font-size: 1.5rem;
width: 100%;
property <color> my-color-1: true ? white : black;
property <color> my-color-1: true ? black : white;
} Can be reproduced with github on this snippet, so this is a bug in the textmate grammar. (https://github.com/slint-ui/slint/blob/master/editors/vscode/slint.tmLanguage.json) |
VSCode seems to be working towards supporting tree-sitter (microsoft/vscode#207416)... that is a way better way to support syntax highlighting than the textmate, Slint supports it and it works fine there: Maybe we can just switch to tree-sitter soon? |
Relevant in VS Code might be microsoft/vscode#210475 . It looks like right now they're using the grammars compiled to WASM and it's not extensible yet. Very promising though :) |
Regardless, we'll still want to maintain the textmate grammar for other things that uses it like the GitHub. |
1. Add in all the color names 2. Move more constants into the general section 3. Apply the general section when parsing properties Fixes: slint-ui#6323
With #6355 applied this is what the example from above looks like in VSCode: using the default dark theme... |
The following syntax highlighting in VS Code looks off:
(
%
should probably be colored like the digits, because this is also the case with units likepx
.)The text was updated successfully, but these errors were encountered: