Saving results in empty file #8532
-
SummaryWhenever I want to edit .rs files, I end up with an empty file. Upon saving the buffer, I get the message "file modified by an external process. Use w! to overwrite". w! doesn't change the outcome. It is 100% reproducible and only occurs on .rs files. Toml files among others are fine. I don't know if LSP can be a source of problems, but I can tell that this happens with LSP disabled/enabled/installed/uninstalled all the same. I have this issue for almost a year now. I hoped for a magical fix, but now I'm here. Reproduction StepsI tried this:
I expected this to happen: Instead, this happened: Helix log~/.cache/helix/helix.log
Yes, this is the entire log. PlatformArch Linux Terminal Emulatorwezterm 20230712-072601-f4abf8fd Helix Versionhelix 23.05 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
We use mtime to detect if the file was changed after opening the file. I suspect that it's something related to your system but I'm not familiar enough with linux to say. |
Beta Was this translation helpful? Give feedback.
-
Do you have any custom language configuration - anything in |
Beta Was this translation helpful? Give feedback.
External formatters pass in the file through stdin and expect the formatted result through stdout. cargo-fmt currently doesn't support that: rust-lang/rustfmt#5071.