VTGroup
VTGroup

Reputation: 769

How to turn off "matching" highlighting in VS Code?

I don't want Visual Studio Code to highlight matching brackets, all occurrences of the same variable, etc. I find it very distracting. However, I can find no way to disable this feature.

The only highlight options I seem to be able to change are "editor.selectionHighlight" and "editor.renderLineHighlight", and neither work.

Is it possible to disable "matching highlighting"? Or maybe to edit my theme, so that the highlight color and highlight border are the same as the background color?

Upvotes: 66

Views: 43578

Answers (5)

Alex
Alex

Reputation: 67929

There are different types of highlighting:

1. Syntax highlighting (place cursor inside variable)

enter image description here

"editor.occurrencesHighlight": "off"

2. Selection highlighting (similar chunks in document)

enter image description here

"editor.selectionHighlight": false

3. Matching brackets highlighting

"editor.matchBrackets": false

There's a second way - make them less obtrusive (or completely transparent):

"workbench.colorCustomizations": {
    "editor.selectionHighlightBackground": "#0000", // similar selection
    "editor.selectionHighlightBorder": "#0000",

    "editor.wordHighlightStrongBackground": "#0000", // syntax variable assignment
    "editor.wordHighlightStrongBorder": "#0000",

    "editor.wordHighlightBackground": "#0000", // syntax variable
    "editor.wordHighlightBorder": "#0000",

    "editorBracketMatch.border": "#0000",// brackets
    "editorBracketMatch.background": "#0000",
}

Upvotes: 145

Shivam Tomar
Shivam Tomar

Reputation: 121

"Occurrences Highlight" is the setting you are looking for.

Upvotes: 11

Ashraf Farhan
Ashraf Farhan

Reputation: 486

Try this one "editor.matchBrackets": false in your Preferences - User/Workspace setting

image here

Upvotes: 13

InstictV
InstictV

Reputation: 161

The same achievement from @Alex's answer could be done from the VSCode settings.

Go to Preferences -> Settings and there search for Highlight.
A lot of option would appear, but the ones useful would be under the Text Editor section. Also, you could decide if change it globally (through the User Settings) or just for that window (Workspace Settings).

Upvotes: 3

Mayco Anderson
Mayco Anderson

Reputation: 71

Try going to Preferences-> User Settings
In the settings.json to the right add:

"editor.selectionHighlight": false

Upvotes: 7

Related Questions