Oct 23, 2026

gopls adds interactive refactoring built on a proposed Language Server Protocol extension

Go's language server can now ask for input mid-refactoring, such as which struct tags to add, with support in gopls v0.24.0 and the VS Code Go extension.

The Go team has introduced interactive refactoring in gopls, the Go language server. It relies on a capability the team is proposing for the Language Server Protocol, designed together with the Dart team, that lets a server show multi-step dialogs and collect input before it computes edits.

Until now most LSP code actions took no parameters, so gopls had to guess. The Add struct tags action, for instance, always produced json tags in camelCase. With the new mechanism, an editor prompts for the tag names and the naming convention, and Remove struct tags asks which keys to delete.

The same mechanism powers an action that adds method stubs so a type satisfies an interface, with search-as-you-type for interface names. A Move declaration action, with a file picker for the destination, is shown as a working preview and is scheduled for a later gopls release.

Support is available in gopls v0.24.0 and in version 0.56.0 of the official Go extension for VS Code. Because the proposal is a protocol change, other editors such as Neovim and Emacs need client support before they can show the dialogs, so check your editor's release notes.

Sources

Verified Oct 23, 2026 (official source). gogoplsdeveloper-tools