Different syntax highlighting based on the code

Is their anyway to add to the Resharper Fonts and Colours in Visual Studio?

e.g. there is

Resharper Todo Item Normal that highlights things in blue.

Can we add to this?

I thought we could via adding custom to-do patterns, but this doesn't seem to be working.

0
3 comments

Hello Stuart!

 

Thank you for contacting us.

Could you please specify what kind of item you'd like to add to Fonts and Colors? Possibly some screenshot or code sample illustrating your request will be helpful.

Thank you.

0

Hi,

Sorry I wasn't clear.


We often have the following patterns in our code:

 

We often end up with a lot of Logging lines that always start with either Logger.Info, or Logger.Error, Logger.Trace, Logger.Debug etc.

It would be nice to be able to create a custom pattern that using some regex would find lines that fit the pattern Logger.Foo("bar") and then have resharper grey that line out. In the same way it finds TODO lines or NotImplementedException.

 

0

Hello Stuart!

 

Sorry for delay in responding.

There's no way to highlight such patterns in ReSharper..

You can try using to-do items and try pattern matching 'Logger' searching them in identifiers. Though it will highlight only Logger entries. not entire string.

You are welcome to report corresponding feature request - https://youtrack.jetbrains.com/issues/RSRP

Thank you.

0

Please sign in to leave a comment.