Skip to content

Conversation

@RedCMD
Copy link
Contributor

@RedCMD RedCMD commented Apr 5, 2025

fixes #190564

removes broken tokenTypes

"tokenTypes": {
"meta.template.expression": "other",
"meta.template.expression string": "string",
"meta.template.expression comment": "comment",

leaving meta.embedded.line.ts to do the correct job with embedded brackets ()
and adds "punctuation.definition.template-expression": "other" to mark the template expression brackets ${} as brackets

if you wish to have the expression brackets ${} be colour highlighted
then ${, } should be add to "colorizedBracketPairs" in:

"colorizedBracketPairs": [
[
"(",
")"
],
[
"[",
"]"
],
[
"{",
"}"
],
[
"<",
">"
]
],

before:
image

after:
image

with coloured ${}:
image

`${`${("{")}`}`;
const str = `${("{")}`

@hediet
Copy link
Member

hediet commented Apr 7, 2025

Thanks!

@hediet hediet enabled auto-merge (squash) April 7, 2025 09:42
@hediet hediet force-pushed the fixTemplateBrackets branch from 15c233a to f0d04a9 Compare April 11, 2025 12:19
@hediet hediet merged commit ae5d91e into microsoft:main Apr 11, 2025
7 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators May 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bracket pair colorizing fails in nested template strings

4 participants