Skip to content

Format modifications on save not working correctly #1620

@deadeyejoe

Description

@deadeyejoe

I have format on save enabled, and it's configured to only format modifications (I'm working on a codebase with some non-standard indentation). When I edit the middle of a list of indented arguments, the indentation is removed when I save. A good example of this is require statements:

Peek 2022-03-24 16-21

You can see the modified line indicator at the left hand side. When I save the indentation is removed, and hitting tab indents the forms correctly.

I'm guessing that the format on save is only formatting what it's given, while the format on tab is able to consider the enclosing form and that's why it indents correctly. Is there anything that can be done about it?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions