Closed hediet closed 1 year ago
Unfortunately, this causes red brackets since the latest update (because we consider "brackets" again, even if "colorizedBracketPairs" is set):
Small clarification for readers that this is from the latest VS Code [1.76.0] update
Until this is addressed, a workaround is possible by setting brackets in your VS Code user settings.json
:
{
"[jsx]": {
"editor.language.brackets": [
["{", "}"], ["[", "]"], ["(", ")"]
]
},
"[jsx-attr]": {
"editor.language.brackets": [
["{", "}"], ["[", "]"], ["(", ")"]
]
}
}
Thanks for the detailed issue, taking a look at this now.
Should be fixed in v0.0.37
Describe the issue
This is the current language configuration that babel ships for jsx:
Because
["<", ">"]
is configured as bracket pair, VS Code tries to match these brackets, but only if they have the same language id.Unfortunately, this causes red brackets since the latest update (because we consider "brackets" again, even if "colorizedBracketPairs" is set):
This is because the language id of the opening bracket and closing bracket don't agree:
Sample Code to Reproduce
Possible Solution
I recommend to just remove the "<" ... ">" bracket pair.