Are we able to change color of warnings?

Hello there :raised_hand_with_fingers_splayed:

I enjoy using the Vs Code extension of Sonarlint.
But the yellow color in the warnings has been bothering me for a while.
In some places, I do not deactivate it in case the warning I receive may be needed in the future.

I am using the application for Java. Thanks!

Hello, welcome to the community! And thanks for your question.

SonarLint reports problems using VSCode’s built-in “Warning” level, there is no color scheme dedicated to the issues it reports.

However, you can set the color for all problems of the “Warning” level in your settings:

{
    "workbench.colorCustomizations": {
        "editorWarning.foreground": "#ffcc00" // VSCode should even show a color picker to help you choose
    },
}

Hope this helps!

1 Like

Omg, thank you so much for the quick response and your help!
I also may improve the settings by:

{
    "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
    },

}

By the additions, I changed the color that appears on the file names.

1 Like

Awesome, thanks for sharing!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.