-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Please select any editor that you're experiencing this issue in.
- Visual Studio Code
- Sublime Text 2/3
- TextMate 2
Please provide the name/repo of the color scheme package you're using:
- irrelevant
(optional) Please include any packages/extensions you're using which could be conflicting:
- Deferring to the VS Code less syntax highlighting from within a Svelte file's
styletag
When using an unknown pseudo class, the highlighting ends up in a broken state, which can influence/mess up how the code after it is highlighted.
Example:
:global(.demo) {
color: blue;
}Will provide just meta.selector.less as the token for :global, but it should be entity.other.attribute-name.pseudo-class.less like it is for known pseudo classes, like is:(.demo) { }.
This came up in sveltejs/language-tools#2650, the repo for the Svelte extension which defers the syntax highlighting of <style lang="less"> to VS Code's built-in grammar, which to my knowledge is this grammar. :global is not a spec-ed pseudo class, rather a Svelte-specific one.
As far as I can see this is due to https://github.com/radium-v/Better-Less/blob/master/Syntaxes/Better%20Less.YAML-tmLanguage#L1952 only matching on a known list of pseudo classes.