SonarSource / sonarlint-visualstudio

SonarLint extension for VisualStudio
https://redirect.sonarsource.com/doc/sonar-visualstudio.html
GNU Lesser General Public License v3.0
460 stars 77 forks source link

Colourize output in the SonarLint Output Window #3258

Open duncanp-sonar opened 2 years ago

duncanp-sonar commented 2 years ago

Description

There is a lot of content in the SonarLint Output Window, making it difficult to see important messages such as errors. Adding colourization would make important output such as errors easier to find.

Notes

VSColorOutput64 is a general-purpose extension that colourizes the output window based on regular expressions. It does this using the standard Editor extensibility APIs.

We could do a more limited version targeted just at our Output Window.

duncanp-sonar commented 1 year ago

Note:: we only want to colourize our output window pane. It looks like we might be able to specify a document / content type when creating the pane - see the IVsOutputWindow3 documentation:

Creates an output window pane with the specified content type and text view roles. For more information about content types and text view roles, see Language Service and Editor Extension Points.

i.e. we should be able specify a custom content type when creating the pane, and then write a classifier etc that targets just that content type so only our output pane would be colourised.