("Dark+ (default dark)" theme, Cascadia Code font (but happens on any font))
Both > tokens are marked as unmatched brackets and colorized red; the first > is part of the => token, the second is an ordinary > operator. Disabling the ms-vscode.typescript-javascript-grammar fixes the highlighting and shows no errors, as does disabling editor.bracketPairColorization.enabled as that simply disables any kind of colorization.
While this manifests as the unexpected-closing-bracket class being added to spans containing the > character, the "Developer: Inspect Editor Tokens and Scopes" tool still shows => as a single token, both with the same foreground color value. It's only .monaco-editor .unexpected-closing-bracket that then colors it red.
Note also that 1 < 2 > 3 doesn't get colorized as mismatched brackets because it thinks the < operator is the start of a bracketed expression.
TS and JS Grammar Extension version: 0.0.55 / latest
Code
("Dark+ (default dark)" theme, Cascadia Code font (but happens on any font))
Both
>
tokens are marked as unmatched brackets and colorized red; the first>
is part of the=>
token, the second is an ordinary>
operator. Disabling thems-vscode.typescript-javascript-grammar
fixes the highlighting and shows no errors, as does disablingeditor.bracketPairColorization.enabled
as that simply disables any kind of colorization.c.f. https://github.com/microsoft/vscode/issues/157322
While this manifests as the
unexpected-closing-bracket
class being added to spans containing the>
character, the "Developer: Inspect Editor Tokens and Scopes" tool still shows=>
as a single token, both with the sameforeground
color value. It's only.monaco-editor .unexpected-closing-bracket
that then colors it red.Note also that
1 < 2 > 3
doesn't get colorized as mismatched brackets because it thinks the<
operator is the start of a bracketed expression.