# Functions
DefaultOptions is the options that are used for Gopls execution independent of any externally provided configuration (LSP initialization, command invocation, etc.).
# Constants
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
AllSymbolScope matches symbols in any loaded package, including dependencies.
AssignVariableTypes controls inlay hints for variable types in assign statements: ```go i/* int*/, j/* int*/ := 0, len(r)-1 ```.
No description provided by the author
No description provided by the author
No description provided by the author
Run `go generate`
This codelens source annotates any `//go:generate` comments with commands to run `go generate` in this directory, on all directories recursively beneath this one.
Re-generate cgo declarations
This codelens source annotates an `import "C"` declaration with a command to re-run the [cgo command](https://pkg.go.dev/cmd/cgo) to regenerate the corresponding Go declarations.
Run govulncheck (legacy)
This codelens source annotates the `module` directive in a go.mod file with a command to run Govulncheck asynchronously.
Run tests and benchmarks
This codelens source annotates each `Test` and `Benchmark` function in a `*_test.go` file with a command to run it.
Tidy go.mod file
This codelens source annotates the `module` directive in a go.mod file with a command to run [`go mod tidy`](https://go.dev/ref/mod#go-mod-tidy), which ensures that the go.mod file matches the source code in the module.
Update dependencies
This codelens source annotates the `module` directive in a go.mod file with commands to:
- check for available upgrades, - upgrade direct dependencies, and - upgrade all dependencies transitively.
Update vendor directory
This codelens source annotates the `module` directive in a go.mod file with a command to run [`go mod vendor`](https://go.dev/ref/mod#go-mod-vendor), which creates or updates the directory named `vendor` in the module root so that it contains an up-to-date copy of all necessary package dependencies.
Run govulncheck
This codelens source annotates the `module` directive in a go.mod file with a command to run govulncheck synchronously.
CompositeLiteralFieldNames inlay hints for composite literal field names: ```go {/*in: */"Hello, world", /*want: */"dlrow ,olleH"} ```.
CompositeLiteralTypes controls inlay hints for composite literal types: ```go for _, c := range []struct { in, want string }{ /*struct{ in string; want string }*/{"Hello, world", "dlrow ,olleH"}, } ```.
ConstantValues controls inlay hints for constant values: ```go const ( KindNone Kind = iota/* = 0*/ KindPrint/* = 1*/ KindPrintf/* = 2*/ KindErrorf/* = 3*/ ) ```.
No description provided by the author
Trigger diagnostics on file edit and save.
Trigger diagnostics only on file save.
DynamicSymbols uses whichever qualifier results in the highest scoring match for the given symbol query.
No description provided by the author
FullyQualifiedSymbols is fully qualified symbols, i.e.
FunctionTypeParameters inlay hints for implicit type parameters on generic functions: ```go myFoo/*[int, string]*/(1, "hello") ```.
No description provided by the author
source.
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
gopls.
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
In Imports mode, `gopls` will report vulnerabilities that affect packages directly and indirectly used by the analyzed main module.
Disable vulnerability analysis.
No description provided by the author
PackageQualifiedSymbols is package qualified symbols i.e.
ParameterNames controls inlay hints for parameter names: ```go parseInt(/* str: */ "123", /* radix: */ 8) ```.
RangeVariableTypes controls inlay hints for variable types in range statements: ```go for k/* int*/, v/* string*/ := range []string{} { fmt.Println(k, v) } ```.
refactor.extract.
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
refactor.inline.
refactor.rewrite.
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
CodeAction kinds specific to gopls
See ../protocol/tsprotocol.go for LSP standard kinds, including
quickfix refactor refactor.extract refactor.inline refactor.move refactor.rewrite source source.organizeImports source.fixAll notebook
Kinds are hierarchical: "refactor" subsumes "refactor.inline", which subsumes "refactor.inline.call".
No description provided by the author
Structured is a misguided experimental setting that returns a JSON hover format.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
WorkspaceSymbolScope matches symbols in workspace packages only.
# Structs
Analyzer augments a [analysis.Analyzer] with additional LSP configuration.
Note: BuildOptions must be comparable with reflect.DeepEqual.
ClientOptions holds LSP-specific configuration that is provided by the client.
Note: CompletionOptions must be comparable with reflect.DeepEqual.
Note: DiagnosticOptions must be comparable with reflect.DeepEqual.
Note: DocumentationOptions must be comparable with reflect.DeepEqual.
Note: FormattingOptions must be comparable with reflect.DeepEqual.
No description provided by the author
InternalOptions contains settings that are not intended for use by the average user.
No description provided by the author
Options holds various configuration that affects Gopls execution, organized by the nature or origin of the settings.
ServerOptions holds LSP-specific configuration that is provided by the server.
A SoftError is an error that does not affect the functionality of gopls.
Note: UIOptions must be comparable with reflect.DeepEqual.
UserOptions holds custom Gopls configuration (not part of the LSP) that is modified by the client.
# Type aliases
A CodeLensSource identifies an (algorithmic) source of code lenses.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ImportsSourceEnum has legal values:
- `off` to disable searching the file system for imports - `gopls` to use the metadata graph and module cache index - `goimports` for the old behavior, to be deprecated.
An InlayHint identifies a category of hint that may be independently requested through the "hints" setting.
LinksInHoverEnum has legal values:
- `false`, for no links; - `true`, for links to the `linkTarget` domain; or - `"gopls"`, for links to gopls' internal documentation viewer.
No description provided by the author
No description provided by the author
A SymbolMatcher controls the matching of symbols for workspace/symbol requests.
A SymbolScope controls the search scope for workspace/symbol requests.
A SymbolStyle controls the formatting of symbols in workspace/symbol results.
No description provided by the author
No description provided by the author