How to disable angle bracket highlighting in Visual Studio Code?

Viewed 12147

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

6 Answers

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

enter image description here

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

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.

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

Related