Interactive refactoring in gopls
22 points by carlana
22 points by carlana
Really cool, it was always neat to be able to highlight code and extract it to a function/method or implement basic methods that are required for some reasons; all automatically. I think I had first seen this in Eclipse or IntelliJ?
There's a bunch of QoL improvements you can imagine (some already being there): finding dead code, renaming symbols at scale, changing file paths update imports and build tools, context aware renaming as well, etc.
Nice to see it will or might become a common toolbox for all languages actually!
I am really looking forward to testing this! It seems super useful for me, especially the capability to add the methods that implement an interface.
Does anyone know if this can already be used on neovim? Does the neovim LSP implementation support this feature?
Does anyone know if this can already be used on neovim? Does the neovim LSP implementation support this feature?
In my experience, Neovim is quite strict about implementing (at most) only things that are already in the formal LSP spec. (This isn't a criticism: it's a reasonable choice for them to make.) So until this feature is officially part of LSP, my guess would be that Neovim won't support it.
That said, the Go team also provided their own "proof-of-concept client integrations" for Neovim and Emacs at the bottom of the post. (NB: as of 2026-11-17, the proof-of-concept fork for Neovim is "1281 commits behind neovim/neovim:master." That's not a criticism either, but fyi for testers who also run Neovim nightly.)
The linked issue on LSP has a link to a fork of neovim implementing it if you want to live on the edge.
I don’t use Go, but it would be so cool to see these things in other languages! I just hope editors (I use Helix) support this once it’s finalized. I wonder how much work it would be to add support.
I can't believe this wasn't a part of LSP to begin with --- it's wild to me that they had a separate special case for renaming. I had just assumed that under the hood the LSP worked by passing parameters e.g. for fn name, but I guess that cursor position is a better source of truth in the majority of use cases (and avoids the editor having to parse anything). Still, though, it feels like an obvious thing that you might want to pass some context when doing e.g. auto refactors.