JetBrains Rider 2020.3 Help

C# Type Name Hints

Use this settings page to configure inlay hints for type names at variables and expressions.

General

Use compact type name presentation

Sometimes type names can be too long. For example, an anonymous type with a few fields will look like this:

JetBrains Rider: Inlay hints. long type name

When this option is enabled, a shortened type name is displayed in the hint.

JetBrains Rider: Inlay hints. compact type name
Hide if type name is evident from variable name

This option hides type name hints in cases similar to the following one:

JetBrains Rider: Inlay hints in evident cases

Method return type

These hints will appear after methods if the next method in the chain is written in a new line:

JetBrains Rider: Inlay hints return type in call chain
Visibility

Use the selector to choose how inlay hints for method return type should be displayed in the editor: choose Default to apply the general visibility preference from the Editor | Inlay Hints | General page of JetBrains Rider settings, choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.

Include property, field and variable accessors in invocation chain
Hide for single invocations and one-line method chains
Hide for the last invocation when hin is irrelevant
Join hints for sequences of method invocations with the same return type
Mode

Implicitly typed variables

This kind of hints lets you display type names for var s.

Visibility

Use the selector to choose how type name hints for implicitly typed variables should be displayed in the editor: choose Default to apply the general visibility preference from the Editor | Inlay Hints | General page of JetBrains Rider settings, choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.

Hide if type of variable is evidentThis option is enabled by default so that hints of this kind will not appear where they are not necessary for understanding the type. To learn more, which cases JetBrains Rider considers evident, see Use 'var' when evident: what is considered evident?.

Pattern matching expressions

This kind of hints lets you show type names for var s, recursive patterns, and tuples in C# pattern matching expressions. For example:

JetBrains Rider: Inlay hints. pattern matching

Use the Visibility selector to choose how type name hints for pattern matching expressions should be displayed in the editor: choose Default to apply the general visibility preference from the Editor | Inlay Hints | General page of JetBrains Rider settings, choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.

Lambda expression parameters

This kind of hints displays type names after parameters of lambda expressions.

JetBrains Rider: Inlay hints. lambda expression parameter
Visibility

Use the selector to choose how type name hints for implicitly typed variables should be displayed in the editor: choose Default to apply the general visibility preference from the Editor | Inlay Hints | General page of JetBrains Rider settings, choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.

Hide if types of parameters are evidentThis option is enabled by default so that hints of this kind will not appear where they are not necessary for understanding the type. For example, when the initializer is a constructor call, a constant, or an explicit cast. To learn more, which cases JetBrains Rider considers evident, see Use 'var' when evident: what is considered evident?.

LINQ range variables

This kind of hints displays type names in LINQ expressions.

JetBrains Rider: Inlay hints in LINQ expressions

Use the Visibility selector to choose how type name in LINQ expressions should be displayed in the editor: choose Default to apply the general visibility preference from the Editor | Inlay Hints | General page of JetBrains Rider settings, choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.

Last modified: 09 March 2021