Reputation: 1366
I would like matching brackets in vscode to be colored instead of given a border/background. What is the correct property for it in setting? Currently I have this:
{
"workbench.colorCustomizations": {
"editorBracketMatch.border": "#000",
"editorBracketMatch.background": "#000"
}
}
How should I modify this to get the desired result?
Upvotes: 5
Views: 1882
Reputation: 1323223
VSCode 1.60, Aug. 2021 will support that directly:
High performance bracket pair colorization
The editor now supports native bracket pair colorization:
Bracket pair colorization can be enabled by setting "editor.bracketPairColorization.enabled": true.
All colors are themeable and up to six colors can be configured.We implemented this feature to address performance issues of the famous Bracket Pair Colorizer extension by CoenraadS.
In the settings, you can set colors from foreground1
to foreground6
:
colorCustomizations:
{
"workbench.colorCustomizations": {
"editorBracketHighlight.foreground1": "#3700ff",
"editorBracketHighlight.foreground2": "#66ff00",
"editorBracketHighlight.unexpectedBracket.foreground": "#ff0000",
}
}
VSCode 1.66 (Feb. 2022) will port over a feature from Bracket Pair Colorizer 2:
"
bracket-pair-colorizer-2.colorMode
"
See commit d54c705 and setting editor.bracketPairColorization.useIndependentColorPoolPerBracketType
.
See also "Custom brace highlighting in Visual Studio Code" with VSCode 1.76, Feb. 2023, where you can configure highlights for a subset of brackets.
Upvotes: 6