+4








eb3c4b0e46
Co-authored-by: Raunak Raj <nkray21111983@gmail.com> Co-authored-by: Thorsten Ball <mrnugget@gmail.com> Co-authored-by: Bennet <bennet@zed.dev> Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Joseph T Lyons <JosephTLyons@gmail.com> Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Jason <jason@zed.dev> Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com> Co-authored-by: Marshall <marshall@zed.dev> Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Jason Mancuso <7891333+jvmncs@users.noreply.github.com> Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
1.3 KiB
1.3 KiB
Go
Go support is available natively in Zed.
- Tree Sitter: tree-sitter/tree-sitter-go
- Language Server: golang/tools/tree/master/gopls
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": {
"gopls": {
"initialization_options": {
"hints": {
....
}
}
}
}
to override these settings.
See gopls inlayHints documentation for more information.
Go Mod
- Tree Sitter: camdencheek/tree-sitter-go-mod
- Language Server: N/A
Go Sum
- Tree Sitter: amaanq/tree-sitter-go-sum
- Language Server: N/A
Go Work
- Tree Sitter: tree-sitter-go-work
- Language Server: N/A