gopls-lsp — Claude Code plugin for Go: what it does, how to install
Wires the gopls language server into Claude so the agent can navigate and refactor Go code instead of guessing.
/plugin install gopls-lsp@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-officialWhat gopls-lsp does
This plugin gives Claude access to gopls, the Go language server. The agent gets code navigation, renames and compiler diagnostics rather than working from raw file text. It handles .go files.
The server itself is not bundled. Install it with the Go toolchain: go install golang.org/x/tools/gopls@latest. Then check that $GOPATH/bin or $HOME/go/bin is on your PATH — without it Claude never finds the binary and the plugin does nothing.
After that it is a plain marketplace install, and the plugin picks up gopls from your machine. No per-project config needed.
What it helps with
- rename a function across a Go project without missing call sites
- jump to the definition of a type or interface by name
- fix code after a compiler error instead of guessing the cause
- get oriented in an unfamiliar Go package before editing
Example prompts for the agent
- rename the ParseConfig function across every file in the package
- find where the Reader interface is defined in this project
- why won't this file compile — show me the gopls errors
How to install gopls-lsp
Plugin marketplace
/plugin install gopls-lsp@claude-plugins-official/plugin marketplace add anthropics/claude-plugins-officialStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about gopls-lsp
How do I install gopls-lsp in Claude?
Add the marketplace first: /plugin marketplace add anthropics/claude-plugins-official. Then install the plugin: /plugin install gopls-lsp@claude-plugins-official.
What does gopls-lsp do?
It connects the gopls language server to Claude for Go code navigation, refactoring and analysis. It covers .go files.
What do I need before installing the plugin?
gopls itself: go install golang.org/x/tools/gopls@latest. Also make sure $GOPATH/bin or $HOME/go/bin is on your PATH.
Source text
gopls-lsp · Apache-2.0
# gopls-lsp Go language server for Claude Code, providing code intelligence, refactoring, and analysis. ## Supported Extensions `.go` ## Installation Install gopls using the Go toolchain: ```bash go install golang.org/x/tools/gopls@latest ``` Make sure `$GOPATH/bin` (or `$HOME/go/bin`) is in your PATH. ## More Information - [gopls Documentation](https://pkg.go.dev/golang.org/x/tools/gopls) - [GitHub Repository](https://github.com/golang/tools/tree/master/gopls)
© Anthropic · Apache-2.0 · anthropics/claude-plugins-official