Go
Go のサポートは Zed でネイティブに利用できます。
- Tree Sitter: tree-sitter-go
- 言語サーバー: gopls
インレイ ヒント
Zed はインレイ ヒントに次の初期化オプションを設定します
"hints": {
"assignVariableTypes": true,
"compositeLiteralFields": true,
"compositeLiteralTypes": true,
"constantValues": true,
"functionTypeParameters": true,
"parameterNames": true,
"rangeVariableTypes": true
}
Zed で設定で有効になっている場合に、言語サーバーがインレイ ヒントを返信するようにします。
使用
"lsp": {
"$LANGUAGE_SERVER_NAME": {
"initialization_options": {
"hints": {
....
}
}
}
}
これらの設定をオーバーライドします。
詳細については、https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md を参照してください。
Go Mod
- Tree Sitter: tree-sitter-gomod
- 言語サーバー: なし
Go Sum
TODO: https://github.com/zed-industries/zed/pull/7139
Go Work
- Tree Sitter: tree-sitter-go-work
- 言語サーバー: なし