Skip to content

Wishlist: quick fix for "possible incorrect indentation" #2834

Open
@vivainio

Description

@vivainio

Repro steps

Have this code:

    let foo = match [1] with
    | _ -> ()

You get squigglies for |, with the tip:

Possible incorrect indentation: this token is offside of context started at position (119:15). Try indenting this token further or using standard formatting conventions."

We could have an autofix to indent this correctly, yielding code:

    let foo = match [1] with
              | _ -> ()

As a bonus, pressing "tab" on the second line could stop at the minimum correct indentation. Currently,
you need to press space N times to hit the exact spot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions