Open Julow opened 1 year ago
The regression I mention is fixed by https://github.com/ocaml-ppx/ocamlformat/pull/2398
The indentation of the arguments of a fun
that precedes a label has to follow partly the proposed indentation:
let () =
very_long_function_name
~very_long_argument_label:(fun
very_long_argument_name_one
very_long_argument_name_two
very_long_argument_name_three
-> () )
let () =
very_long_function_name
~very_long_argument_label:(* foo *)
(fun
very_long_argument_name_one
very_long_argument_name_two
very_long_argument_name_three
-> () )
Function arguments are indented in different ways depending on context:
This example contains a regression: (red is 0.25.1)
I propose the following formatting:
fun
passed as argument is aligned with the keyword. This applies tofun
wrapped in parentheses.fun
keyword when it's the body of a let. Gets rid of the 1-indentedfun
and is more consistent with the sugared form.