Go
Zed 原生支援 Go 語言。
- 樹狀解析器:tree-sitter-go
- 語言伺服器:gopls
嵌入提示
當 Zed 在設定中啟用嵌入提示時,Zed 會為嵌入提示設定以下初始化選項
"hints": {
"assignVariableTypes": true,
"compositeLiteralFields": true,
"compositeLiteralTypes": true,
"constantValues": true,
"functionTypeParameters": true,
"parameterNames": true,
"rangeVariableTypes": true
}
以使語言伺服器發送回嵌入提示。
使用
"lsp": {
"$LANGUAGE_SERVER_NAME": {
"initialization_options": {
"hints": {
....
}
}
}
}
覆蓋這些設定。
如需更多資訊,請參閱 https://github.com/golang/tools/blob/master/gopls/doc/inlayHints.md。
Go Mod
- 樹狀解析器:tree-sitter-gomod
- 語言伺服器:無
Go Sum
TODO:https://github.com/zed-industries/zed/pull/7139
Go Work
- 樹狀解析器:tree-sitter-go-work
- 語言伺服器:無