New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: add insert-replace support (insertReplaceEdit) #40871
Comments
I'm not familiar with this codebase, but it appears that there might already be a commit relevant to a fix for this issue at https://go-review.googlesource.com/c/tools/+/196119/. There's also a related issue report that was frozen due to age at #34011. |
Also relevant to this behavior is the LSP client's |
This issue regressed since it was fixed in https://go-review.googlesource.com/c/tools/+/196119/ .
Interesting. Adding support for that could be the best way forward since preferences differ. |
Selfishly, I still prefer the behavior I advocated for in #34011, so any way that preserves the behavior will make me happy. |
Sorry, I failed to read the second part of your comment |
Is anyone following up |
I don't have time at the moment to implement the I'll try to revisit at some point and implement the capability. |
Currently gopls is overwriting the surrounding suffix (in addition to prefix) when inserting candidates:
I think it's from https://go-review.googlesource.com/c/tools/+/208501 changing the surrounding's range from
[ident.Pos(), c.pos]
to[ident.Pos(), ident.End()]
./cc @heschik
The text was updated successfully, but these errors were encountered: