zed icon indicating copy to clipboard operation
zed copied to clipboard

format_on_save: save only changed lines

Open HendrikJan opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the feature

Currently format_on_save has two options: "on" and "off".

It would be useful to have the option "only changed lines", so that only lines that you just edited will be formatted. This way your coworkers will not be confronted with all indentation changes in a pull request.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

HendrikJan avatar Aug 20 '24 09:08 HendrikJan

This is really a nearly critical feature for making small fixes in someone else’s code and then submitting a PR. If your personal format settings don’t happen to match the whole file and you submit a PR that reformats 90% of a file because you modified one line that would be not ok. Having to be very careful and manual about this is an annoyance.

pjv avatar Aug 20 '24 12:08 pjv

has this been added ? please

NathBabs avatar Nov 15 '24 11:11 NathBabs

Is there any plan to implement this?

rucoder avatar Jun 22 '25 21:06 rucoder