有人知道 VS Code Insiders 中此设置的名称吗?对于变灰的参数和变量注释
Does anybody know the name of this setting inside of VS Code Insiders? For grayed out parameter and variable annotations
我正在尝试找出启用这些小内联注释的设置。
那些是Inlay Hints
。您可以使用以下设置启用(默认)或禁用它们:
Editor > Inlay Hints: Enabled
或通过在设置 UI 中搜索 Inlay Hints
来更改 Font Family
或 Font Size
。
并且可以更好地控制参数 names/types、变量类型以及 js/ts 个文件。
有关更多信息,请参阅发行说明 v1.60 release notes:
The most significant new tooling feature in TypeScript 4.4 is inlay
hint support. Inlay hints add additional inline information to source
code to help you understand what the code does.
Parameter name inlay hints for example show the names of parameters in
function calls:
This can help you understand the meaning of each argument at a glance,
which is especially helpful for functions that take Boolean flags or
have parameters that are easy to mix up.
To enable parameter name hints, set
javascript.inlayHints.parameterNames.enabled
or
typescript.inlayHints.parameterNames
settings. There are three
possible values:
none
— Disable parameter inlay hints. literals
— Only show inlay
hints for literals (string, number, Boolean). all
— Show inlay
hints for all arguments.
In addition, VS Code also offers inlay hints that show implicit type
information in your JavaScript and TypeScript code.
Variable type inlay hints show the types of variables that don't have
an explicit type annotations.
Settings - javascript.inlayHints.variableTypes.enabled
and
typescript.inlayHints.variableTypes.enabled
[发行说明中还有更多内容 link。]
我正在尝试找出启用这些小内联注释的设置。
那些是Inlay Hints
。您可以使用以下设置启用(默认)或禁用它们:
Editor > Inlay Hints: Enabled
或通过在设置 UI 中搜索 Inlay Hints
来更改 Font Family
或 Font Size
。
并且可以更好地控制参数 names/types、变量类型以及 js/ts 个文件。
有关更多信息,请参阅发行说明 v1.60 release notes:
The most significant new tooling feature in TypeScript 4.4 is inlay hint support. Inlay hints add additional inline information to source code to help you understand what the code does.
Parameter name inlay hints for example show the names of parameters in function calls:
This can help you understand the meaning of each argument at a glance, which is especially helpful for functions that take Boolean flags or have parameters that are easy to mix up.
To enable parameter name hints, set
javascript.inlayHints.parameterNames.enabled
ortypescript.inlayHints.parameterNames
settings. There are three possible values:
none
— Disable parameter inlay hints.literals
— Only show inlay hints for literals (string, number, Boolean).all
— Show inlay hints for all arguments.In addition, VS Code also offers inlay hints that show implicit type information in your JavaScript and TypeScript code.
Variable type inlay hints show the types of variables that don't have an explicit type annotations.
Settings -
javascript.inlayHints.variableTypes.enabled
andtypescript.inlayHints.variableTypes.enabled
[发行说明中还有更多内容 link。]