Go

Zed 原生支援 Go 語言。

嵌入提示

當 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

Go Sum

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

Go Work