MordFustang21 / ide-gopls

Atom integration with the Go language server (gopls)
MIT License
13 stars 5 forks source link

When I save file and last line isn't empty, it removes last line. #9

Open nickborysov opened 4 years ago

nickborysov commented 4 years ago

Description

When I save file and last line isn't empty, it removes last line. If I disable ide-gopls, it's working properly.

Steps to Reproduce

  1. Enable ide-gopls in Atom.
  2. Create or open some file .*go.
  3. Remove empty line in the end of the file.
  4. Save file.

Expected behavior:

Add emty line to end of file.

Actual behavior:

Remove last line of the code.

Reproduces how often:

Always.

Versions

atom --version
Atom    : 1.45.0
Electron: 4.2.7
Chrome  : 69.0.3497.128
Node    : 10.11.0
apm --version
apm  2.4.3
npm  6.2.0
node 10.2.1 x64
atom 1.45.0
python 2.7.16
git 2.21.0
Additional Information

OS : macOS Mojave 10.14.6

Screen recording

gopls_bug

rdnt commented 4 years ago

Confirming this, happened to me yesterday. Will see if I can find the cause.

stamblerre commented 4 years ago

Thanks for the report! Since I can't reproduce this in VS Code, my guess is that this is a bug in this extension, or possible the atom-language-client library that this depends on.