Skip to content

format_on_save: save only changed lines #16509

@HendrikJan

Description

@HendrikJan

Description

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.

It would be nice if the same logic could also suppress jitter from remove_trailing_whitespace_on_save / ensure_final_newline_on_save changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editorFeedback for code editing, formatting, editor iterations, etcarea:settingsFeedback for preferences, configuration, etcarea:toolingAn umbrella label for language tools, linters, formatters, etc

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions