Skip to content

Consider line breaking in let and match arms #497

Closed
@nrc

Description

@nrc

We should consider line breaks after = in let statements and => in match arms if that gives us better formatting.

So, what is better? That is the fun bit. I would say that if without a break we use >1 lines and with we only use 1 then it is better. Also if the line break means we use many fewer lines (more than 2 fewer maybe?). It would be nice to be able to check if we're causing ugly rightward drift too. So add an option for how many spaces indent is ugly, and if we use the same number of lines or fewer and we change the indent from > ugly to < ugly, then it is better. I imagine this will take some experimentation.

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