ReSharper 2021.2 Help

Syntax highlighting

ReSharper extends the default Visual Studio's symbol highlighting. Additionally, it highlights fields, local variables, types, and other identifier with configurable colors. For example, ReSharper syntax highlighting allows you to easily distinguish between local variables and fields in your code.

ReSharper syntax highlighting for C# with default colors looks as follows:

ReSharper: Syntax highlighting in C#

Toggle ReSharper syntax highlighting

  1. Select ReSharper | Options from the main menu or press Alt+R O, then choose Code Inspection | Settings on the left.

  2. Use the Color Identifiers checkbox to enable or disable ReSharper syntax highlighting.

  3. Click Save in the Options dialog to apply the modifications and let ReSharper choose where to save them, or save the modifications to a specific settings layer using the Save To list. For more information, see Manage and share ReSharper settings.

Configure colors and fonts

  1. Choose Tools | Options from the menu and then go to Environment | Font and Colors page.

  2. In Display items, scroll down the list until you find items that begin with ReSharper. Explore the list to view or edit formatting and highlighting of ReSharper items.

This feature is supported in the following languages and technologies:

Language: C#Language: VB.NETLanguage: C++Language: HTMLLanguage: ASP.NETLanguage: RazorLanguage: JavaScriptLanguage: TypeScriptLanguage: CSSLanguage: XMLLanguage: XAMLLanguage: ResxLanguage: Build ScriptsLanguage: ProtobufLanguage: JSON
Feature is available in C#Feature is available in Visual Basic .NET Syntax highlighting in C++Feature is available in HTMLFeature is available in ASP.NETFeature is available in RazorFeature is available in JavaScriptFeature is available in TypeScriptFeature is available in CSSFeature is available in XMLFeature is available in XAMLFeature is available in Resource filesFeature is available in build script filesFeature is available in ProtobufFeature is available in JSON

The instructions and examples given here address the use of the feature in C#. For details specific to other languages, see corresponding topics in the ReSharper by language section.

Last modified: 20 August 2021