This document describes the LSP-level commands supported by gopls
. They cannot be invoked directly by users, and all the details are subject to change, so nobody should rely on this information.
Identifier: gopls.add_dependency
Adds a dependency to the go.mod file for a module.
Identifier: gopls.apply_fix
Applies a fix to a region of source code.
Identifier: gopls.check_upgrades
Checks for module upgrades.
Identifier: gopls.gc_details
Toggle the calculation of gc annotations.
Identifier: gopls.generate
Runs go generate
for a given directory.
Identifier: gopls.generate_gopls_mod
(Re)generate the gopls.mod file for a workspace.
Identifier: gopls.go_get_package
Runs go get
to fetch a package.
Identifier: gopls.regenerate_cgo
Regenerates cgo definitions.
Identifier: gopls.remove_dependency
Removes a dependency from the go.mod file of a module.
Identifier: gopls.run_tests
Runs go test
for a specific set of test or benchmark functions.
Identifier: gopls.test
Runs go test
for a specific set of test or benchmark functions.
Identifier: gopls.tidy
Runs go mod tidy
for a module.
Identifier: gopls.toggle_gc_details
Toggle the calculation of gc annotations.
Identifier: gopls.update_go_sum
Updates the go.sum file for a module.
Identifier: gopls.upgrade_dependency
Upgrades a dependency in the go.mod file for a module.
Identifier: gopls.vendor
Runs go mod vendor
for a module.