1# Go
2
3- Tree Sitter: [tree-sitter-go](https://github.com/tree-sitter/tree-sitter-go)
4- Language Server: [gopls](https://github.com/golang/tools/tree/master/gopls)
5
6## Inlay Hints
7
8Zed sets the following initialization options for inlay hints:
9
10```json
11"hints": {
12 "assignVariableTypes": true,
13 "compositeLiteralFields": true,
14 "compositeLiteralTypes": true,
15 "constantValues": true,
16 "functionTypeParameters": true,
17 "parameterNames": true,
18 "rangeVariableTypes": true
19}
20```
21
22to make the language server send back inlay hints when Zed has them enabled in the settings.
23
24Use
25
26```json
27"lsp": {
28 "$LANGUAGE_SERVER_NAME": {
29 "initialization_options": {
30 "hints": {
31 ....
32 }
33 }
34 }
35}
36```
37
38to override these settings.
39
40See https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md for more information.
41
42# Go Mod
43
44- Tree Sitter: [tree-sitter-gomod](https://github.com/camdencheek/tree-sitter-go-mod)
45- Language Server: N/A
46
47# Go Sum
48
49TODO: https://github.com/zed-industries/zed/pull/7139
50
51# Go Work
52
53- Tree Sitter:
54 [tree-sitter-go-work](https://github.com/d1y/tree-sitter-go-work)
55- Language Server: N/A