Vadim Peretokin
Vadim Peretokin

Reputation: 2826

How to disable angle bracket highlighting in Visual Studio Code?

I just want to disable the character highlighting that happens on angle brackets, as I find the square box to be annoying. Is there a way to turn it off?

enter image description here

Upvotes: 35

Views: 15989

Answers (6)

bttcld
bttcld

Reputation: 87

You can add this

{
  "editor.matchBrackets": "near"
}

somewhere in ~/.config/Code/User/settings.json. This means that all projects inherit behavior.

This way, only when you move the cursor over a bracket, the corresponding one is shown.

Upvotes: 2

Mijan
Mijan

Reputation: 11

Yaa. there is a solution for hiding the annoying marking I just found. go to the setting button in left bottom side then write- angle bracket -in the search option and search as well. Then press the "text editor", a selecting option will come in the top named "Editor:Match Brackets". Select "Never" and your work is done here. See the attached picture if needed.

enter image description here

Upvotes: 1

Asad
Asad

Reputation: 283

You can search keyword highlight in setting, and you change Editor:Match Bracket to never, like this:

enter image description here

Upvotes: 27

kanlukasz
kanlukasz

Reputation: 1314

Unfortunately it's still unconfigurable. Maybe they will improved it.

Here is my ticket in VSCode repo that you can watch - https://github.com/microsoft/vscode/issues/73521.

As long as they do not improve, you have two ways

Solution with addon:

  1. Disable native bracket matching: "editor.matchBrackets": false,
  2. Install addon from https://marketplace.visualstudio.com/items?itemName=rafamel.subtle-brackets
  3. Customize it for better visuality, example:
    "subtleBrackets.style": {
        "borderStyle": "solid",
        "borderColor": "#CC7832",
        "borderRadius": "3px",
    }

enter image description here enter image description here

Native solution without addon:

  • You can disable bracket matching highlight only for specific language:
"[html]": {
   "editor.matchBrackets": false
}

Note that this is not a perfect solution, because when using html in php files, angle brackets are still highlighted

Upvotes: 5

Mark
Mark

Reputation: 181060

You can always make the bracket border color transparent with these settings:

"workbench.colorCustomizations": {

    "editorBracketMatch.border": "#0000",
    "editorBracketMatch.background": "#000"
}

This will make the border transparent and the bracket's background black - or just make it something less obtrusive given your editor background. But again, this will apply to all brackets, not just angle brackets.

Upvotes: 15

Sourav De
Sourav De

Reputation: 493

You can use the following: // Highlight matching brackets when one of them is selected. "editor.matchBrackets": false, however it disables highlighting all the brackets not only the angle brackets.

Upvotes: 17

Related Questions