typescript.md

TypeScript

TypeScript and TSX support are available natively in Zed.

Inlay Hints

Zed sets the following initialization options for inlay hints:

"preferences": {
    "includeInlayParameterNameHints": "all",
    "includeInlayParameterNameHintsWhenArgumentMatchesName": true,
    "includeInlayFunctionParameterTypeHints": true,
    "includeInlayVariableTypeHints": true,
    "includeInlayVariableTypeHintsWhenTypeMatchesName": true,
    "includeInlayPropertyDeclarationTypeHints": true,
    "includeInlayFunctionLikeReturnTypeHints": true,
    "includeInlayEnumMemberValueHints": true,
}

to make the language server send back inlay hints when Zed has them enabled in the settings.

Use

"lsp": {
    "$LANGUAGE_SERVER_NAME": {
        "initialization_options": {
            "preferences": {
                ....
            }
        }
    }
}

to override these settings.

See typescript-language-server inlayhints documentation for more information.

See also