Go language server (gopls) providing code intelligence, refactoring, and analysis for .go files. Use when working with Go code that needs autocomplete, go-to-definition, find references, error detection, or refactoring support.
Go language server integration providing comprehensive code intelligence through gopls (the official Go language server).
.goInstall gopls using the Go toolchain:
go install golang.org/x/tools/gopls@latest
Important: Make sure $GOPATH/bin (or $HOME/go/bin) is in your PATH.
Verify installation:
gopls version
The language server runs automatically in LSP-compatible editors. For manual operations:
gofmt -w file.go
go vet ./...
go build ./...
go test ./...
Create gopls.yaml in your project or workspace for custom settings: