gopls adds interactive refactoring dialogs, backed by a proposed Language Server Protocol extension
Go tooling can now ask for input during refactorings such as adding struct tags, with the design offered as an open standard.
The Go team has introduced interactive refactoring in gopls, the Go language server. It relies on a proposed extension to the Language Server Protocol that lets a server ask the user questions before it computes edits. The Go team says it designed the proposal together with the Dart team so other languages and editors can use it.
Until now most code actions in the protocol took no parameters, so a refactoring such as adding struct tags had to guess, and always produced camelCase json tags. With the new dialogs, a developer can choose the tag keys and naming convention, pick an interface to implement with live symbol search, or choose which file to move a declaration to.
Struct tag editing and interface stub generation arrived in gopls v0.23.0. Interactive refactoring as a whole is available in gopls v0.24.0 and the Go extension for VS Code v0.56.0, and the post says proof-of-concept integrations exist for Neovim and Emacs. Moving declarations is described as a preview scheduled for a later release.
Go developers who use VS Code can update gopls and the Go extension to try the dialogs. Maintainers of other language servers and editors can read the linked design document and discussion if they want to implement the protocol extension.
Sources
- Interactive refactoring in goplsofficial
Verified Oct 27, 2026 (official source). gogoplslspdevelopertools