Add Semantic Tokens for Template Literal Strings
benrbray opened this issue · comments
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 that typescript-language-server
labels all template strings with the generic string
scope. As a result, template strings will not receive syntax highlighting when semantic tokens are enabled.
As you can see from the image below, the textmate
grammar knows that animal
is a variable inside of a template string, but the semantic token string
is taking precedence.
In VSCode you are not using this server but VSCode's built-in code (which this server is based on). So you should report your issue in VSCode repo and if it's deemed a bug, the fix might potentially trickle down to this server.