ReSharper 2019.3 Help

Inlay Hints

ReSharper| Options | Environment | Editor | Inlay Hints

On this page of ReSharper options, you can configure inlay hints for C#, VB.NET, and C++.

Show inlay hints

Lets you either enable or disable the entire inlay hints functionality.

Parameter Name Hints

Show parameter name hints

Lets you enable or disable parameter name hints.

Hide for non-literals

Hides parameter name hints for arguments that are variables, resources, expressions, or invocations allowing you to configure exceptions for specific kinds of non-literal arguments.

Hide for builder-like methods

Hide parameter name hints for methods similar to methods of System.Text.StringBuilder, which return a modified object of their containing class. Names of such methods normally make clear the purpose of their parameters.

Hide if method parameters only differ by numbered suffix

Hides parameter name hints when calling methods with signatures similar to

void DoSomething(int arg0, int arg1, int arg2, int arg3) {/*...*/}

Hide if intention of first parameter is clear from method name

Hides parameter name hint on the first argument when calling methods with signatures similar to

void SetExtension(string extension, object next) {/*...*/}

Hide if intention of argument is clear from usage

For methods with signatures similar to

void DoSomething(int value, object context) {/*...*/}
hides the value parameter name hint if the method is called like so
DoSomething(myValue, context: null);

Hide if method is annotated as 'StringFormatMethod'

This option hides parameter name hints for String.Format-like methods marked with the StringFormatMethodAttribute.

Show code annotations hints on parameter declarations

Use this option to show JetBrains code annotation attributes used in base classes on overriding and implementing members:

ReSharper: Inlay hints. code annotations

You can configure a list of method patterns for which the parameter name hints will be always hidden, independently of other preferences.

Patterns are matched against fully qualified method name, parameter count, and parameter names. For example:

  • System.Math.* matches all methods whose FQN starts with System.Math

  • System.Math.*(*, *) matches all methods from System.Math namespace with two parameters

  • (*info) matches all single-parameter methods where the parameter name ends with info

  • (key, value) matches all methods with parameters key and value

  • Put(key, value) matches all Put methods with key and value

Show namespace name hints after namespace definitions This option works independently of parameter name hints.

A large project can have any number of namespaces, which sometimes are nested or even do not have a name. In such cases, hints will indicate what namespace is being closed by the current brace:

ReSharper: Inlay hints. Namespaces.
Show reference hints for arguments passed by non-const reference

According to the Google C++ Style Guide, non-const reference parameters are not allowed, except when required by convention or in some rare cases. But when this is your case, there are reference hints:

ReSharper: reference hints for function arguments passed by a non-const reference

Show preprocessor directive hints

Preprocessor directive hints help you quickly understand how conditional inclusions (#ifdef, #ifndef, #if, #endif, #else, and #elif) correspond to macro definitions:

ReSharper: Preprocessor directive hints in C++

Hide name hints in aggregate initialization

Parameter name hints show the names of the members you are initializing and help disentangle complex aggregate initializations in C++17 and later:

ReSharper C++: parameter name hints in aggregate initialization

Hide parameter name hints in macro calls

Hints for macro calls provide the details from substitution:

ReSharper: Inlay hints. Macro calls.

Hide index hints for array elements

Array hints can help with multidimensional initialization:

ReSharper: Inlay hints. Array elements.

You can configure a list of method patterns for which the parameter name hints will be always hidden, independently of other preferences.

Patterns are matched against fully qualified method name, parameter count, and parameter names. For example:

  • System.Math.* matches all methods whose FQN starts with System.Math

  • System.Math.*(*, *) matches all methods from System.Math namespace with two parameters

  • (*info) matches all single-parameter methods where the parameter name ends with info

  • (key, value) matches all methods with parameters key and value

  • Put(key, value) matches all Put methods with key and value

Type Name Hints

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:

ReSharper: Inlay hints. long type name

When this option is enabled, a shortened type name is displayed in the hint. You can hover the mouse over the hint to see the full type name.

ReSharper: Inlay hints. compact type name
Show method return type name hints

Use this option to enable or disable type name hints for return types of methods in a call chain. These hints will appear after methods if the next method in the chain is written in a new line:

ReSharper: Inlay hints return type in call chain

Use child options to configure exceptions and presentation for this kind of hints.

Show type name hints for implicitly typed variables

Use this option to show or hide type name hints for vars.

The child option Hide if type of variable is evident 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 ReSharper considers evident, see Use 'var' when evident: what is considered evident?.

Show type name hints for pattern matching expressions

Use this option to show or hide type name hints for vars, recursive patterns, and tuples in C# pattern matching expressions. For example:

ReSharper: Inlay hints. pattern matching
Show type name hints for lambda expression parameters

This option enables type name hints after parameters of lambda expressions.

ReSharper: Inlay hints. lambda expression parameter

The child option Hide if types of parameters are evident 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 ReSharper considers evident, see Use 'var' when evident: what is considered evident?.

Show type name hints for query range variables in LINQ queries

This option enables type name hints in LINQ expressions.

ReSharper: Inlay hints in LINQ expressions
Hide if type name is evident from variable name

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

ReSharper: Inlay hints in evident cases

Show type name hints for function return types in C++

Return types of functions can be automatically deduced from the return statement:

ReSharper C++: type name hints for function return types

Show type name hints for lambda return types in C++

Use this option to enable type name hints for the deduced return types of lambdas:

ReSharper C++: type name hints for lambda return types

Show type name hints in dependent C++ code (might affect performance when enabled)

Inside the definition of a template, the meaning of some constructs may differ from one instantiation to another. But ReSharper C++ still can provide some additional useful information for types and expressions.

ReSharper C++: type name hints for dependent code

Last modified: 16 April 2020