What does HackerNews think of ocamlformat?

Auto-formatter for OCaml code

Language: OCaml

It's ironic that just as the excellent https://github.com/ocaml-ppx/ocamlformat is seemingly closing in on a 1.0 after ~4 years of development, here comes the implication that it's not good enough.
A lot of these issues are now solved. OCaml universe now switched to Dune[1] as an uniform buildsystem, using ocamlformat[2] as an uniform formatting tool (succeeding over ocp-indent), Base[3] standard library aims to be the only one, a lot of legacy cruft was removed in recent compiler versions, along with improved error messages. Real World OCaml book[4] is now being modernized for the second edition. Recently even the design of documentation produced with odoc was improved and cleaned up a lot So it tries to catch up with more modern programming languages.

[1] https://dune.build

[2] https://github.com/ocaml-ppx/ocamlformat

[3] https://opensource.janestreet.com/base/

[4] https://dev.realworldocaml.org/

While not a traditional IDE, Merlin [1] combined with vim/emacs/vscode is really good (autocompletion, jump to definition, type lookup and more). Merlin also gained support for language server protocol recently so that could be an option for any editor/IDE that has a language server client.

[1] https://github.com/ocaml/merlin.git

EDIT: I'd also like to point out OCamlformat (https://github.com/ocaml-ppx/ocamlformat). It works really well in my experience and makes it really easy to perform automatic code formatting, and can be used in CI to check that changed conform to the formatting style a project prefers.

I'd say if you ever get the time again, give OCaml another look. The toolchain experience has been improving at a rapid pace! I started to explore OCaml again earlier this year and the day to day tooling around it has felt at par or better than my experience with other languages.

Between Opam [1], Dune[2] and utop[3] the "new comer experience" has been really good so far. The editor integration with vim/emacs has been top notch, and visual studio code has turned into a really nice option as well for people who don't like vim/emacs. I'm sure there is still room for improvement, but i'd say its atleast heading in the right direction!

[1] https://github.com/ocaml/opam

[2] https://github.com/ocaml/dune

[3] https://github.com/diml/utop

[4] https://github.com/ocaml-ppx/ocamlformat