Ben
Ben

Reputation: 63

VS Code: change foreground color for files with problems in the file explorer

I am having a hard time changing the foreground color for the 'problem files' in visual studio as shown below. The default color is black as shown in the snapshot below (look closer at the in 'index.js' file in the file explorer).

enter image description here

I will like to change the foreground color from black to any color so it the file can be visible when I use a darker theme. Can anyone help, please?

Upvotes: 5

Views: 2294

Answers (2)

Yusuf Arslan
Yusuf Arslan

Reputation: 61

Here is the answer I got from the sonar community.

Sonar Source Community

Add this to the settings.json file in your workspace.

"workbench.colorCustomizations": {
    "editorWarning.foreground": "#757575",  // Warnings inside the file
    "editorError.foreground": "#f66",       // Errors inside the file
    "list.warningForeground": "#757575",    // Warnings on the file name
    "list.errorForeground": "#f66",         // Errors on the file name
},

Upvotes: 1

Alex
Alex

Reputation: 67591

From vscode 1.24 the colors for file explorer can be assigned separately from editor warnings:

"list.errorForeground": "#f66",
"list.warningForeground": "#ff6",

Upvotes: 9

Related Questions