-
Notifications
You must be signed in to change notification settings - Fork 28.2k
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
[themes] Flattening of text mate scopes leads to wrong coloring #3008
Comments
Problem is the flattening of the text mate scopes |
I believe this is still an issue with destructuring in ES6 let {
first,
second,
third
} = destructVar;
let otherVar = 6; The second |
@aeschli, could you point to the syntax highlighting heuristic code which disambiguate these tokens, so we can try to fix it? |
Flattening happens at https://github.com/Microsoft/vscode/blob/master/src/vs/editor/node/textMate/TMSyntax.ts#L324 |
Don't know if I understand this correct.. One problem is the interference of the scopes because they are handled as css classes attached to the span tokens in the editor. For example: A class block gets the scope So the methodname token gets this classes: If you want to style classname and methodname the highlighting depends on the order in the tmTheme file. This is because the token has the css-class How can this be fixed? One approach is to add the scopes as they are to the html span-tokens i.e. Other ideas? |
Other problematic languages with deep scope hierarchies:
The text was updated successfully, but these errors were encountered: