x/tools/gopls: rename responds with unsorted edits #33123
Labels
FrozenDueToAge
gopls
Issues related to the Go language server, gopls.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, reproduces with gopls v0.1.3
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Rename
foo
tofooBar
.What did you expect to see?
What did you see instead?
This is happening because the golpls sends unsorted text edits (line 3 edit appears before line 2 edit) and I'm applying the edits in reverse order as documented in the integrator FAQ:
I'm using acme-lsp, but you may be able to reproduce the bug with govim because I got the idea of applying edits in reverse order from @myitcv.
The text was updated successfully, but these errors were encountered: