-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: returns incorrect text edits #33289
Comments
The response looks correct to me? Also I think it works in VSCode (the bug did not have the original source file to repro with so I was guessing from the returned edits)
Also note that a file without a \n a the end is not correctly formatted according to gofmt, so the formatting call will attempt to fix it for you. |
I was believing there are overlaps because of the two edits targeting the same range. But that might fall into the Slightly off topic, VSCode itself works usually doesn't justify there isn't any issue. There are far too many implementations that are using VSCode as standard rather than the protocol itself, which makes plugins authors life harder. Thanks for looking into this! |
Ok. Glad I could help. |
I see.👍
…On Tue, Jul 30, 2019 at 01:00 Ian Cottrell ***@***.***> wrote:
Ok. Glad I could help.
I was not trying to imply that VSCode is always correct, just letting you
know that I had attempted to reproduce it on the editor I normally use and
was not just replying without checking, because it frustrates me when
people do that to me.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#33289?email_source=notifications&email_token=AALC33677GSDMQRPKBUYPQDQB7YKDA5CNFSM4IHAJR4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3DEB5Q#issuecomment-516309238>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AALC335UROOGZX6IKDEESJDQB7YKDANCNFSM4IHAJR4A>
.
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
set nofixeol
in vim/neovim.:call LanguageClient#textDocument_formatting_sync()
Note: this is not specific to this vim/neovim LSP client. It would affects many other LSP clients as the response is violating the protocol.
What did you expect to see?
gopls sends properly text edits.
What did you see instead?
gopls sends incorrect text edits that violate the protocol, in that no two text edits shall overlap.
This is originally reported as autozimu/LanguageClient-neovim#844 Please let me know if there is anything needed from me.
The text was updated successfully, but these errors were encountered: