Change error highlight color in vs code

I build a project and get some problems in the Problems view, I click on the problem to see the highlighted line of code with this problem.

And it really gets highlighted. However, if a dark styled theme is used, highlighting is at least very difficult for me to notice (line 23 highlighted):

enter image description here

My guess is that this color cannot just be hardcoded somewhere, as it differs, for example, in red theme and light themes:

enter image description here enter image description here

Is there a way to change this color?

UPD: This question is not a duplicate of "change error style" ; the error style (squiggle) is applied to all errors at once, my question is to highlight only the selected error.

+3


source to share


1 answer


Apparently you can change it without using an extension. I created an issue and got the answer that this color is called editor.rangeHighlightBackground

and you can override it in user preferences ( settings.json

):

{
    "workbench.colorCustomizations": {
        "editor.rangeHighlightBackground": "#00AA00"
    }
}

      



To open custom preferences, just use Cmd+,

for Mac or Ctrl+,

Windows

+6


source







All Articles