gopls adds interactive refactoring, with prompts for struct tags and interface stubs
The Go team proposes an LSP extension that lets language servers ask for input, and gopls v0.24.0 and the VS Code Go extension already support it.
The Go team has introduced interactive refactoring in gopls, built on a capability it is proposing for the Language Server Protocol, developed together with the Dart team. Working support is available in gopls v0.24.0 and Go extension for VS Code v0.56.0.
Until now, most LSP code actions take no parameters, so a server had to guess what the user wanted or skip the action. Add struct tags, for example, always produced camelCase json tags. With the new mechanism a server can ask questions first: which tags to add, which naming convention to use, or which interface a type should implement.
The post shows add and remove struct tags and an action that generates method stubs for an interface chosen through a searchable prompt. A Move declaration refactoring, which relocates a declaration with its dependent helpers and updates references and imports, is shown as a preview for a later gopls release.
Go developers can update gopls and the VS Code extension to try the new actions. Authors of other editors and language servers can follow the LSP proposal linked in the post, since the design is intended for any language rather than only Go.
Sources
Verified Oct 25, 2026 (official source). gogoplslspdeveloper-tools