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: formatting with missing final line break clears last line #33717
Comments
Thank you for filing a gopls issue! Please take a look at the Troubleshooting section of the gopls Wiki page, and make sure that you have provided all of the relevant information here. |
This might be an issue with sublime, we have a test specifically for this case that passes, and I cannot reproduce in either VSCode or vim. |
Yep, seems to be the case, commandline works. Is this something which I should report to Sublime or the LSP extension? |
Honestly I am not sure, I do not use/run/understand sublime. My guess would be the lsp extension as formatting and the application of edits should be a fundamental feature of lsp integration. |
@ianthehat Hi there! Please have a look at sublimelsp/LSP#690. We think that the server sends an invalid line number. In this example, the file has lines 0..8, and the server requests are for line 9/column 0. |
It looks like the upstream issue in the Sublime repository has been closed. @haferburg is this still an issue? |
@stamblerre Yea, I think so sublimelsp/LSP#717 |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
My apologies - the WaitingForInfo label should have been removed. I will try to investigate this soon. |
Why is this still open? In any case, it shouldn't be blocking 1.0.0 |
I left it open because it seemed to still require investigation (#33717 (comment)). I'm trying to mark all issues that still need investigation as |
Looks like the upstream repository handled it (sublimelsp/LSP#717), so I'm going to close this since all other clients have supported it. If it becomes an issue again, we can reassess. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, of gopls, at least.
What operating system and processor architecture are you using (
go env
)?go env
OutputAlso, running in Sublime with LSP package, if relevant.
What did you do?
Write code. Do not place final empty newline. Format.
What did you expect to see?
Newline added to the end of the file
What did you see instead?
Last line cleared.
The text was updated successfully, but these errors were encountered: