diff --git a/gopls/doc/settings.md b/gopls/doc/settings.md index 6d923b71e3..e04436a34d 100644 --- a/gopls/doc/settings.md +++ b/gopls/doc/settings.md @@ -363,6 +363,9 @@ It might be one of: If company chooses to use its own `godoc.org`, its address can be used as well. +Modules matching the GOPRIVATE environment variable will not have +documentation links in hover. + Default: `"pkg.go.dev"`. ##### **linksInHover** *bool* diff --git a/internal/lsp/source/api_json.go b/internal/lsp/source/api_json.go index 94d0f12b4a..807f496a6b 100755 --- a/internal/lsp/source/api_json.go +++ b/internal/lsp/source/api_json.go @@ -116,7 +116,7 @@ var GeneratedAPIJSON = &APIJSON{ { Name: "linkTarget", Type: "string", - Doc: "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n", + Doc: "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n\nModules matching the GOPRIVATE environment variable will not have\ndocumentation links in hover.\n", Default: "\"pkg.go.dev\"", Hierarchy: "ui.documentation", }, diff --git a/internal/lsp/source/options.go b/internal/lsp/source/options.go index 8fa78ae261..1bb135dd57 100644 --- a/internal/lsp/source/options.go +++ b/internal/lsp/source/options.go @@ -350,6 +350,9 @@ type DocumentationOptions struct { // * `"pkg.go.dev"` // // If company chooses to use its own `godoc.org`, its address can be used as well. + // + // Modules matching the GOPRIVATE environment variable will not have + // documentation links in hover. LinkTarget string // LinksInHover toggles the presence of links to documentation in hover.