-
Notifications
You must be signed in to change notification settings - Fork 305
Automatic rustfmt erases my files sometimes. #260
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
Comments
Tried to reproduce with |
@da-x Thanks for checking. I will try to spend some time and dissect it. The file is there, just empty. I can do |
After I've commented out I guess I'll log an issue against neomake. |
For reference: it also happens with the manual Neomake autocommand. |
Following instructions from neomake/neomake#2080 when doing
The last output is the one after which the file became 0-sized. I was doing
|
All credit to @blueyed . This fixes rust-lang#260 The investigation is in the corresponding Neomake issue: neomake/neomake#2080 This is also related to: rust-lang#259
All credit to `@blueyed`. This fixes rust-lang#260 The investigation is in the corresponding Neomake issue: neomake/neomake#2080 This is also related to: rust-lang#259
All credit to `@blueyed`. This fixes rust-lang#260 The investigation is in the corresponding Neomake issue: neomake/neomake#2080 This is also related to: rust-lang#259
Similarly to what other reformatters plugins do, we should use a combination of setline() and line deletion command to carefully replace the lines of the buffer(). There's issue #236 that seems to not regress in this fix - the problem with '1,$d _' is that it deleted the entire buffer. We should only delete for line numbers that beyond the newly applied buffer content. This has a side effect of handling #260 and #259, as expand('%') is not relied upon.
@dpc is this issue still relevant? Thanks |
No. It's fixed Neomake. |
:PlugUpdate
often.Steps to reproduce:
I think it started happening when I converted my project to use a workspace. The current state is: crev-dev/cargo-crev@d9fbf06
Expected vs. actual behavior:
Typically my vim consistently reformats a file on every save.
Now, for whatever reason, it stops working in the middle of the session for some files (for which it worked fine just a second ago) and from that time it just keeps erasing them every time I write the buffer. :/
Paste debugging info from the Rust Vim plugin via one of the following
commands:
:RustInfo
,:RustInfoToClipboard
, or:RustInfoToFile <filename>
.The text was updated successfully, but these errors were encountered: