Skip to content

0.30.0

Latest

Choose a tag to compare

@Julow Julow released this 24 Nov 10:32
· 3 commits to main since this release

CHANGES:

Highlight

Added

Changed

  • Empty bodies of while loops will be formatted on one line: do () done.
    (#2812, @v-gb)

Fixed

  • Fix dropped comment with if-then-else = keyword-first (#2853, @Julow)

  • Fix closing parenthesis indentation in some expressions and pattern with
    indicate-multiline-delimiters = closing-on-separate-line
    (#2850, #2851, @Julow)

  • Fix dropped parentheses in 1 :: (2 :: [] [@a]) (#2849, @Julow)

  • Fix dropped comment in let[@ocamlformat "disable"] x = 42 (* a *)
    (#2848, @Julow)

  • Fix comment changed on some bad {% ... %} syntax (#2845, @Julow)

  • Fix comment changed containing [\\[\\]] (#2844, @Julow)

  • Fix missing parentheses in effect A, (Some k) (#2843, @Julow)

  • Fix missing parentheses around attributed let open and let module
    expressions on the left of a sequence (#2826, #2827, @kxc-wraikny, @Don-Yin).

  • Fix the indentation of the in keyword after a local exception: it is no
    longer indented one level deeper than the enclosing let, matching the
    behaviour of local types and modules.
    (#2822, #2823, @MisterDA)

  • Fix begin match … end (and begin if … end) branches: with
    if-then-else=fit-or-vertical the match … with header no longer splits
    over several lines and end is aligned with begin; and a leading comment
    on the body no longer reindents it — begin keeps the body one indent in
    instead of gluing the keyword to the comment.
    (#2810, #2815, @MisterDA, @yakobowski)

  • Fix indentation of a bare match/function/try branch preceded by a
    comment with if-then-else=fit-or-vertical: the branch is no longer
    indented relative to the comment's end column.
    (#2810, @MisterDA)

  • Fix formatting oscillation with if-then-else=fit-or-vertical and
    begin...end.
    (#2800, @MisterDA)

  • Fix instability on long if-then-else with if-then-else=fit-or-vertical
    (#2797, @MisterDA)

  • Fix match in if-then-else branches expanding to vertical with
    fit-or-vertical (#2798, @MisterDA)

  • Fix lexer error on Windows when an Odoc code block contains CRLF line
    endings (@hhugo)

  • Fix missing parentheses in (a, ~b:(if .. then .. else ..)) (#2811, @Julow)

  • Fix configuration in $XDG_CONFIG_HOME was not used when
    --enable-outside-detected-project was passed (#2816, @torimus)

  • * Fix a comment before in in a let … in binding forcing an unnecessary
    vertical break: let x = v (* comment *) in … is no longer split across
    several lines when it otherwise fits. This also fixes a related
    non-idempotency. (#2813, @yakobowski)