Can we get the ability to customize the underline color of SonarLint tips?

I would love to see the ability to change the underline color of tips from SonarLint within the Visual Studio Code editor. Currently, they are red, which is the color of syntax errors. I would like to make it a different color since it can be a bit confusing to see red lines without any compilation error. Would it be possible to get the ability to change the color to a custom one?

Also, would it be possible have SonarLint tips have their own filter in the problems tab? Currently, the filter has warnings, errors, & infos. I would love to see a separate filter just for SonarLint issues.

Hello, welcome to the community! And thank you for your questions.

For the first point, our analyzers report issues on 5 levels of severity, which are mapped to the Language Server Protocol’s diagnostic levels as follows:

  • INFO :arrow_right: Hint
  • MINOR :arrow_right: Information
  • MAJOR :arrow_right: Warning
  • CRITICAL, BLOCKER :arrow_right: Error

As of today, this mapping is hard-coded in the SonarLint Language Server, and we already have an issue in the backlog to report CRITICAL and BLOCKER issues as Warning, and thus not put them at the same level as compilation errors.

Note that VSCode uses the same highlight color for all diagnostics with the same level; I’m not sure whether we could use different colors for the ones contributed by SonarLint. However, if you want to change the highlight color of all diagnostics, you can do so by overriding your theme’s color, e.g:

"workbench.colorCustomizations": {
    "editorError.foreground": "#ff0000",
    "editorWarning.foreground": "#ffcc00",
    "editorInfo.foreground": "#00ffff",
    "editorHint.foreground": "#ffffff"

For the second point, we are limited by VSCode’s problems view - which does have an input box that can be used to filter issues e.g based on their source:

1 Like