Open Enyium opened 2 months ago
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 https://github.com/microsoft/vscode/issues/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.
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
.)