# 内嵌提示

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/zh-cn/help/go/llms.txt).

> **TL;DR**
> `文件 | 设置 | 编辑器 | 内嵌提示`  适用于 Windows 和 Linux
>
>
>
> `%instance% | 设置 | 编辑器 | 内嵌提示`  适用于 macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS)) !["设置"图标](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

嵌入提示 是出现在编辑器中的特殊标记，为你的代码提供额外信息，比如被调用方法期望的参数名称。 其他类型的提示会告知您注解、代码作者、用法等信息（取决于语言）。

Procedure: 启用或禁用内嵌提示

* 若要禁用当前在编辑器中显示的提示：

右键单击提示，并选择是要禁用特定类型的提示还是此类别中的所有提示。

![隐藏代码作者名称](https://resources.jetbrains.com/help/img/idea/2026.3/go_hide_code_authors.png)

* 要配置一个或多个特定组的内嵌提示：

打开   设置   对话框（ `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))），转到  `编辑器 | 内联提示` ，并使用提示旁边的复选框来隐藏或显示相应类别的内嵌提示。

![设置 | 内嵌提示](https://resources.jetbrains.com/help/img/idea/2026.3/go_inlay_hints_settings.png)

* 若要为特定参数名称禁用内联提示：

打开   设置  对话框（ `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))），转到  `编辑器 | 内联提示` ，然后单击   排除列表  。 在打开的对话框中，使用完全限定名称或通配符语法指定要排除的符号列表。

![“设置 | 内联提示”中 Go 的排除列表](https://resources.jetbrains.com/help/img/idea/2026.3/go_inlay_hints_exclude_list.png)

* 要一次性启用或禁用所有嵌入提示，请在   全局切换嵌入提示  操作中使用   Search Everywhere  对话框。

按 `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+Shift+P` (VSCode), `F1` (VSCode (macOS))，开始输入  `全局切换嵌入提示` 。 使用切换器在 GoLand 中启用或禁用嵌入提示。

此外，你还可以为此操作分配一个快捷键。 打开   设置  对话框（ `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))），然后进入   键位图  页面。 在搜索字段中输入  `全局切换嵌入提示` ，然后双击操作为其设置快捷键。 有关更多信息，请参见 [键盘快捷键](configuring-keyboard-and-mouse-shortcuts.html)。

在内嵌提示设置中，您可以配置希望在提示中获取的信息类型。

> **Note:**
> 可用语言、上下文和提示类型的列表取决于 [安装/启用的插件](managing-plugins.html)。

## 配置嵌入提示的外观

嵌入提示的颜色和样式取自配色方案。 其大小基于编辑器字体：大多数提示会比周围代码小一磅呈现，并跟随编辑器缩放级别。 默认情况下，GoLand 使用为 IDE 用户接口配置的字体。

Procedure: 更改嵌入提示的颜色和样式

1. 在   设置  对话框 `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))中，进入  `编辑器｜配色方案｜语言默认值` ，然后选择   内联提示  。

2. 选择内嵌提示类型和状态，并根据需要配置字体颜色和效果。

Procedure: 为嵌入提示使用编辑器字体

1. 在   设置  对话框 ( `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Comma` (VSCode), `⌘ Comma` (VSCode (macOS))) 中，前往  `编辑器｜常规｜外观` 。

2. 请选择   为嵌入提示使用编辑器字体  选项。

启用该选项后，GoLand 会将  `设置 | 编辑器 | 字体`  中配置的字体用于嵌入提示。

## 参考

### 代码视图

* 重命名 ：显示带有快速修复的内嵌提示，用于重命名选定的代码项。 ![Go code element renamed](https://resources.jetbrains.com/help/img/idea/2026.3/go_code_element_renamed.png)

* 继承者 ：显示接口及其方法规范的多个实现。 点击 `implementations` 提示以导航到用法。 ![代码视图继承者](https://resources.jetbrains.com/help/img/idea/2026.3/go_code_vision_inheritors.png)

* 用法 ：显示项目中类或方法的多个用法。 点击 `usages` 提示以导航到用法。 ![代码视图用法](https://resources.jetbrains.com/help/img/idea/2026.3/go_code_vision_usages.png)

* 更新依赖项 ：显示用于更新依赖项的快速修复。 有关各种更新选项的更多信息，请参阅 [在 go.mod 中更新依赖项](create-a-project-with-go-modules-integration.html#updating-dependencies-in-go-mod)。 ![代码视图用法](https://resources.jetbrains.com/help/img/idea/2026.3/go_code_vision_update_dependencies.png)

* 实现接口 ：显示允许您在选定结构上实现接口的快速修复。 ![codeLens.vcs.code.vision.name](https://resources.jetbrains.com/help/img/idea/2026.3/go_code_vision_implement_interface.png)

* 代码作者 ：显示给定元素（例如类型或方法）的代码作者。 点击名称提示以打开 Git blame 功能。 作者名称显示在边距中。 ![codeLens.vcs.code.vision.name](https://resources.jetbrains.com/help/img/idea/2026.3/go_code_lens_vcs_code_vision_name.png)

### 参数名称

#### 前往

* 在结构值中显示未命名字段 ：显示匿名字段的名称。 ![在结构值中显示未命名字段](https://resources.jetbrains.com/help/img/idea/2026.3/go_show_unnamed_fields_in_structure_values.png)

* 显示返回参数 ：在 `return` 语句中显示参数名称。 ![显示返回参数](https://resources.jetbrains.com/help/img/idea/2026.3/go_show_return_parameters.png)

#### Javascript

* 非字面量实参 ：显示文字和非文字参数、调用表达式、对象和数组初始化器。 ![js.param.hints.show.names.for.all.args](https://resources.jetbrains.com/help/img/idea/2026.3/go_js_param_hints_show_names_for_all_args.png)

* 标记模板实参​类型​提示​ ：显示标记模板参数。 此设置仅对非文字参数生效，并且仅在启用 非字面量参数 选项时可用。 有关标记模板中参数的更多信息，请参阅 [mozilla.org 上的标记模板](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates)。 ![js.param.hints.show.names.for.tagged](https://resources.jetbrains.com/help/img/idea/2026.3/go_js_param_hints_show_names_for_tagged.png)

* 管道运算符 ：显示管道操作符。 有关管道操作符的更多信息，请参阅 [GitHub 上的 JavaScript 管道操作符 (|&gt;)](https://github.com/tc39/proposal-pipeline-operator)。 ![js.param.hints.show.names.for.pipes](https://resources.jetbrains.com/help/img/idea/2026.3/go_js_param_hints_show_names_for_pipes.png)

#### SQL

* 在 INSERT 值中 ：在 `INSERT` 语句中显示列名。 仅在 查询控制台 中有效，不作为语言注入。 ![在 INSERT 值中](https://resources.jetbrains.com/help/img/idea/2026.3/db_in_insert_values.png)

* 在 SELECT 表达式中 ：在具有设置列名上下文的 `SELECT` 语句中显示列名。 例如， `SELECT` 语句位于 `CREATE VIEW` 和 `INSERT` 中。 仅在 查询控制台 中有效，不作为语言注入。 ![db_in_select_expressions](https://resources.jetbrains.com/help/img/idea/2026.3/db_in_select_expressions.png)

* 对于 * 引用 ：在具有设置列名称上下文的 `SELECT` 语句中显示星号 (*) 引用的列名称。例如， `SELECT` 语句位于 `CREATE VIEW` 和 `INSERT` 中。 仅在 查询控制台 中有效，不作为语言注入。 ![用于星号引用](https://resources.jetbrains.com/help/img/idea/2026.3/db_for_asterisk_references.png)

* 用于集合操作（UNION、INTERSECT、EXCEPT） ：当 `SELECT` 语句用于集合操作（如 `UNION` 、 `INTERSECT` 和 `EXCEPT` ）时，显示列名。 仅在 查询控制台 中有效，不作为语言注入。 ![用于集合操作](https://resources.jetbrains.com/help/img/idea/2026.3/db_for_set_operations.png)

#### TypeScript

* 非字面量实参 ：在方法调用中显示文字和命名对象参数。 ![js.param.hints.show.names.for.all.args](https://resources.jetbrains.com/help/img/idea/2026.3/go_ts_param_hints_show_names_for_all_args.png)

* 标记模板实参​类型​提示​ ：显示标记模板中的参数。 ![js.param.hints.show.names.for.tagged](https://resources.jetbrains.com/help/img/idea/2026.3/go_ts_param_hints_show_names_for_tagged.png)

### 类型

#### Javascript

* 调用链中的函数返回值类型 ：在调用链中显示函数返回类型。 ![method.return.types.in.call.chains](https://resources.jetbrains.com/help/img/idea/2026.3/go_method_return_types_in_call_chains.png)

* 类型注解 ：显示类型注解。 您可以配置希望显示类型注解的情况： * 变量和字段 * 圆括号中的形参 * 未使用括号括起来的单个形参 * 函数返回类型 ![type.annotations](https://resources.jetbrains.com/help/img/idea/2026.3/go_js_type_annotations.png)

#### TypeScript

* 调用链中的函数返回值类型 ：在调用链中显示函数返回类型。 ![method.return.types.in.call.chains](https://resources.jetbrains.com/help/img/idea/2026.3/go_method_return_types_in_call_chains.png)

* 类型注解 ：显示类型注解。 您可以配置希望显示类型注解的情况： * 变量和字段 * 圆括号中的形参 * 未使用括号括起来的单个形参 * 函数返回类型 ![type.annotations](https://resources.jetbrains.com/help/img/idea/2026.3/go_js_type_annotations.png)

### 值

#### 前往

* 前往 ：显示常量定义的值。 ![go_values_inlay_hints](https://resources.jetbrains.com/help/img/idea/2026.3/go_values_inlay_hints.png)

#### TypeScript

* TypeScript ：显示值。 标识使用特殊值（例如 null）的地方。

### URL 路径

#### 前往

* 前往 ：在代码中显示 URL 映射。 该图标提供对 URL 测试和导航选项的快速访问。 ![显示 URL 映射](https://resources.jetbrains.com/help/img/idea/2026.3/go_show_url_mappings.png)

### 其他

#### Dockerfile

* Docker run named stage ：显示一个图标以快速构建或运行 Dockerfile 中的特定命名阶段。 ![Docker run named stage](https://resources.jetbrains.com/help/img/idea/2026.3/go_docker_run_named_stage.png)

#### Markdown

* 表内嵌 ：显示表格周围的水平和垂直条。 提供列和行操作。 ![markdown.table.inlay.kind.name](https://resources.jetbrains.com/help/img/idea/2026.3/go_markdown_table_inlay_kind_name.png)

#### SQL

* 连接基数 ：显示一个表的行与另一个表的行之间的数值关系。 常见的基数包括一对一（ `1<->1` ）、一对多（ `1<->1..n` ）、多对多（ `1..n<->1..n` ）和可选（ `0..n` ）。 当引用字段可为空时，会出现可选基数。 您可以为以下类型的 JOIN 配置内嵌提示： * `INNER JOIN` * `LEFT JOIN` * `RIGHT JOIN` * `FULL JOIN` ![JOIN 基数](https://resources.jetbrains.com/help/img/idea/2026.3/db_join_cardinality.png)

