tyxml icon indicating copy to clipboard operation
tyxml copied to clipboard

Introduce OCamlFormat

Open smorimoto opened this issue 1 year ago • 3 comments

smorimoto avatar Aug 13 '22 19:08 smorimoto

I found a bug in refmt during this journey, so I don't think it will be merged right away, so I would like to ask for your opinion on this in the meantime...

smorimoto avatar Aug 13 '22 19:08 smorimoto

The same solution is likely to help with tricky diff: https://github.com/llvm/llvm-project/blob/main/.git-blame-ignore-revs

smorimoto avatar Aug 13 '22 19:08 smorimoto

We should write a tool that find the ocamlformat options that minimizes the size of the diff, to fit a given project's indentation style :)

Personally, I use ocp-indent more often, with the options below. I don't use ocamlformat unless a project mandates it. Is the current setting the closest to that? In any case, I should probably play with ocamlformat to find what settings I like.

I must admit I'm not fond of the numerous reformatting commits at each ocamlformat version I've seen in the projects that adopted it.

normal
with=0
syntax=mll
max_indent=2

Drup avatar Aug 15 '22 09:08 Drup

I'm going to close this, as I don't think it necessary.

Drup avatar Sep 27 '23 09:09 Drup