zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.93k stars 2.7k forks source link

Add option "remove_trailing_whitespace_on_save": "only on the lines I modified" #16762

Open Vlad-Shcherbina opened 3 weeks ago

Vlad-Shcherbina commented 3 weeks ago

Some people don't care about trailing whitespaces. Some people do care and think there should be none.

There could be a mix of both in a team.

In relaxed hobby projects it is unpleasant to coerce everyone to one of these philosophies.

However, people who care and set up "remove_trailing_whitespace_on_save": true will run into inconveniences, because their commits will touch unrelated lines.

The "remove_trailing_whitespace_on_save": "only on the lines I modified" variant would minimize conflicts in mixed teams.

notpeter commented 3 weeks ago

JetBrains supports this.

image