GoLand 2023.3 Help

Inlay Hints

Inlay hints are special markers that appear in the editor and provide you with additional information about your code, like the names of the parameters that a called method expects. Other types of hints inform you about annotations, method parameters, usages, and so on (depending on the language).

In inlay hints settings, you can configure what types of information you want to get in hints.

Change inlay hints appearance

  1. In the Settings dialog (Control+Alt+S), go to Editor | Color Scheme | Language Defaults, then select Inline hints.

  2. Select the inlay hint type and state, and configure the font color and effects as required.

Reference

Code vision

  • Inheritors: shows the number of implementations for an interface and its method specifications. Click the implementations hint to navigate to usages.

    code vision inheritors
  • Usages: a number of usages of the class or method in the project. Click the usages hint to navigate to usages.

    code vision usages
  • Code author: code authors for a given element (for example, a type or a method). Click the name hint to open the Git blame functionality. Name of the author is displayed in the gutter.

    codeLens.vcs.code.vision.name

Parameter names

Go

  • Show unnamed fields in structure values: show names of anonymous fields.

    Show unnamed fields in structure values
  • Show return parameters: show parameter names in return statements.

    Show return parameters

Javascript

  • Non-literal arguments: show both literal and non-literal arguments, call expressions, objects, and array initializers.

    js.param.hints.show.names.for.all.args
  • Tagged template arguments: show tagged template arguments. This setting takes effect only over non-literal arguments and is only available when the Non-Literal arguments option is enabled.

    For more information about arguments in tagged templates, refer to Tagged templates at mozilla.org.

    js.param.hints.show.names.for.tagged
  • Pipeline operators: show pipeline operators. For more information about pipeline operators, refer to Pipe Operator (|>) for JavaScript at github.com/.

    js.param.hints.show.names.for.pipes

SQL

  • In INSERT values: show names of columns in INSERT statements. Works only in query consoles, not as a language injection.

    In INSERT values
  • In SELECT expressions: show names of columns in SELECT statements that have context that sets column names. For example, SELECT statements inside CREATE VIEW and INSERT. Works only in query consoles, not as a language injection.

    db_in_select_expressions
  • For * references: show names of columns for asterisk (*) references in SELECT statements that have context that sets column names For example, SELECT statements inside CREATE VIEW and INSERT. Works only in query consoles, not as a language injection.

    For asterisk references
  • For set operations (UNION, INTERSECT, EXCEPT): show names of columns in SELECT statements when they are used in set operations like UNION, INTERSECT, and EXCEPT. Works only in query consoles, not as a language injection.

    For set operations

TypeScript

  • Non-literal arguments: show both literal and named object parameters in method calls.

    js.param.hints.show.names.for.all.args
  • Tagged template arguments: show arguments in tagged templates.

    js.param.hints.show.names.for.tagged

Types

Javascript

  • Function return types in call chains: show function return types in call chains.

    method.return.types.in.call.chains
  • Type annotations: show type annotations. You can configure cases in which you want to show type annotations:

    • Variables and fields

    • Parameters in parentheses

    • Non-parenthesized single parameter

    • Function return types

    type.annotations

TypeScript

  • Function return types in call chains: show function return types in call chains.

    method.return.types.in.call.chains
  • Type annotations: show type annotations. You can configure cases in which you want to show type annotations:

    • Variables and fields

    • Parameters in parentheses

    • Non-parenthesized single parameter

    • Function return types

    type.annotations

Values

Go

  • Go: show values of constant definitions.

    go_values_inlay_hints

TypeScript

  • TypeScript: show values. Identifies places where special values (for example, null) are used.

URL path

Go

  • Go: show URL mappings in code. The icon provides quick access to URL testing and navigation options.

    show URL mappings

Other

Dockerfile

  • Docker run named stage: show an icon to quickly build or run a specific named stage in a Dockerfile.

    Docker run named stage

Markdown

  • Table inlays: show horizontal and vertical bars around the table. Provides column and row actions.

    markdown.table.inlay.kind.name

SQL

  • Join cardinality: display the numerical relationship between rows of one table and rows in the other. Common cardinalities include one-to-one (1<->1), one-to-many (1<->1..n), many-to-many(1..n<->1..n), and optional (0..n). The optional cardinality appears when the referring field is nullable.

    You can configure inlay hints for the following types of JOIN:

    • INNER JOIN

    • LEFT JOIN

    • RIGHT JOIN

    • FULL JOIN

    JOIN cardinality
Last modified: 18 January 2024