Sublime-JS-Custom
Sublime-JS-Custom copied to clipboard
Styled Components highlighting bug
Sublime Text build number
4150
Example Code
const myClass = css`
display: block;
`;
JS Custom Preferences
{
"configurations": {
"TSX + CSS": {
"scope": "source.tsx",
"file_extensions": ["tsx"],
"typescript": true,
"jsx": true,
"custom_templates": {
"styled_components": true,
"tags": {
"css": "scope:source.css"
}
}
}
}
}
Configuration name
No response
Description
Currently with those config it works, but it applies original source.css
scope inside template string. I.e. syntax only works inside css class
. But in styled components there is no need to write css class
. It should work on top level, without css selectors.
I tried to add more specific scope
"tags": {
"css": "scope:source.css meta.property-list.css meta.block.css"
}
But this doesn't work, the result scope is text.plain
:cry: