I’ve been looking at switching to ocamlformat and I really like it. There is one case that I so far have not been able to get how I like. I do realize that ocamlformat is not trying to be a one-size fits all but it seems to almost have what I want. The case is for infix monadic operators such as:
Fut.Promise.set t.closed_promise ()
>>= fun () -> Fut.Promise.set t.recv_promise () >>| fun () -> ()
I would like this to always break as one of the two options below
Fut.Promise.set t.closed_promise ()
>>= fun () ->
Fut.Promise.set t.recv_promise ()
>>| fun () ->
()
or (less preferably)
Fut.Promise.set t.closed_promise ()
>>= fun () -> Fut.Promise.set t.recv_promise ()
>>| fun () -> ()
If this is a reasonable request, perhaps break-infix-before-func could be set to always?
I apologize because this is off-topic but, have you looked into using let-operators for these operations? It would solve the formatting issue because the code would just look (almost) like regular let-bindings.
And that being said, I am quite liking ocamlformat and even if I can’t get it quite how I ideally would want my config I’m willing to put up with it to just not have to care.