Files
zed/docs/src/languages/go.md
T
596ee58be8 Bump tree-sitter and related core language parser libraries (#14986)
Closes https://github.com/zed-industries/zed/issues/4565

To fix issues with code blocks' parsing in Markdown, a
tree-sitter-markdown library update is needed.
But `tree_sitter::language` is used in many places within core Zed,
which forced more library updates.

Release Notes:

- Updated tree-sitter parsers for core languages

---------

Co-authored-by: Max Brunsfeld <max@zed.dev>
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2024-07-24 23:38:21 +03:00

1.2 KiB

Go

Go support is available natively in Zed.

Inlay Hints

Zed sets the following initialization options for inlay hints:

"hints": {
    "assignVariableTypes": true,
    "compositeLiteralFields": true,
    "compositeLiteralTypes": true,
    "constantValues": true,
    "functionTypeParameters": true,
    "parameterNames": true,
    "rangeVariableTypes": 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": {
            "hints": {
                ....
            }
        }
    }
}

to override these settings.

See https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md for more information.

Go Mod

Go Sum

TODO: https://github.com/zed-industries/zed/pull/7139

Go Work