Semantic Tokens for TypeScript Template Literal Strings #58900
Labels
Help Wanted
You can do this
Possible Improvement
The current behavior isn't wrong, but it's possible to see that it might be better in some cases
Milestone
(moved from typescript-language-server/typescript-language-server#901)
Problem
In VS Code, semantic token theme colors override textmate token colors (even when they are user defined). This usually makes sense, as the semantic tokens are intended to provide more specific information about tokens than what is available from syntax alone.
However, based on the output of VS Code's
Developer: Inspect Editor Tokens and Scopes
command, it appears thattypescript-language-server
labels all template strings with the genericstring
scope. As a result, template strings will not receive syntax highlighting when semantic tokens are enabled, degrading the user experience writing TypeScript when semantic highlighting is enabled.As you can see from the image below, the
textmate
grammar knows thatanimal
is a variable inside of a template string, but the semantic tokenstring
is taking precedence.Possible Solutions
Related Issues
The text was updated successfully, but these errors were encountered: