Go

Go のサポートは Zed でネイティブに利用できます。

インレイ ヒント

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

Go Sum

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

Go Work