-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
clang-format on C code remove existent code #8410
Comments
@Warkanlock I can't reproduce this. I did observe some similar behavior around the time of this report where Can you see if you are still experiencing thing scary behavior? |
Might it be solved on the latest versions of Zed? I've not used Zed anymore for C programming, given this issue, so I cannot confirm nor deny that this keeps happening |
@notpeter I think this problem still persists.
MacBook M1 - macOS Sonoma 14.5 - Zed 0.143.7 Whenever I delete any line and press escape to Screen.Recording.2024-07-15.at.12.00.32.mov |
I went back to my configuration file after reading this thread since I opened a long time ago, and something that fixed the issue for me was to disable the
Using this configuration chunk now essentially I can use Zed as part of the workflow; however, I need to run the |
Thanks for quick response. Disabling I agree it's not a priority, rather a good feature to have. It would be great if you could add a message or a quick note about Thank you once again for what you're doing. Switched fully to zed and enjoy it on a daily basis ! |
This issue might not be related to only ConfigurationHere is a snippet of my Zed configuration. "languages": {
"C": {
"formatter": {
"external": {
"command": "indent",
"arguments": [ "{buffer_path}", "-linux", "-nut", "-i4", "-o", "/dev/stdout" ]
}
}
}
} A short summary of the arguments:
EnvironmentZed: 0.143.6 (via DNF, Terra) |
I've read the Zed documentation again. Using
Replacing |
|
This works for clang-format:
|
Check for existing issues
Describe the bug / provide steps to reproduce it
After setting a language configuration for C code in
languages
my code, after being saved, is replaced with the latest N-1 step previously done on the editor.For example:
struct
definition.struct,
together with a summary comment.This is the configuration used (utilizing
clang-format
as default):Turning
format_on_save
tooff
solves the issue, but I need to manuallysave > format
workflow.Environment
Zed: v0.123.6 (Zed)
OS: macOS 14.3.1
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
With
format_on_save: on
format_on_save_on.mov
With
format_on_save: off
format_on_save_off.mov
The text was updated successfully, but these errors were encountered: