internal/lsp/source: document the handling of GOPRIVATE for linkTarget

Document that modules matching GOPRIVATE will not be linked.

Updates golang/vscode-go#2362

Change-Id: I7e2447bb50a2cd0d7d394f8589ccd4498f889048
Reviewed-on: https://go-review.googlesource.com/c/tools/+/419979
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Robert Findley 2022-07-28 13:28:39 -04:00 committed by Gopher Robot
parent 98bfcd1bee
commit d01bb2ff91
3 changed files with 7 additions and 1 deletions

View File

@ -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*

View File

@ -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",
},

View File

@ -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.