Closed jfieber closed 1 year ago
A bit wonky to discover and reproduce what was wrong because gopls seems a little inconsistent about whether it wants to put a newline at the end. Compare with this nugget in my own mothballed go extension, so I apparently ran into this in the past.
Good catch.
I will cut a new release shortly with this.
When a file in Nova has no newline at the end, and gopls formatting decides to append one, it sends an LSP range one past the end of the Nova line array.
This manifests by deleting your document on format because the default Nova range is [0, document.length].