package ocamlformat-rpc-lib
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=9bd3e3cfb0da1b2f75eccd468f27ea1b92e6e677bb6129491764957031dedfed
sha512=6da6f56cb4c605a87020dd7511c99b0114d844d7e26c727ffef521390265bc8f1e8a86e0e4ac916d27df56734941957468aa3462ae01991b522e75c42b392597
README.md.html
README.md
OCamlFormat
Hello, new user! Welcome! :wave:
If you are here, you are probably interested in using a formatting tool for your code base, so that you do not have to worry about formatting it by hand, and to speed up code review by focusing on the important parts.
OCamlFormat is probably what you are after!
OCamlFormat works by parsing then outputting again the same OCaml source file in a consistent style.
Read the documentation to learn more about OCamlFormat!
Getting started
Installation
OCamlFormat can be installed with opam
:
opam install ocamlformat
Alternatively, see ocamlformat.opam
for manual build instructions.
Formatting code!
Setting up your project to use the default profile and the OCamlFormat version you installed (hopefully the last one) in this .ocamlformat
file is considered good practice:
profile = default
version = 0.23.0
To manually invoke OCamlformat the general command is:
ocamlformat [OPTION]... [SRC]...
See ocamlformat --help
or man ocamlformat
for the detail about options.
You can also view it online.
The most common usecase involves using the dune
build system, once your project is correctly setup (see Dune's manual) you can reformat your project using:
dune build @fmt
Community
See CONTRIBUTING for how to help out.
License
OCamlFormat is MIT-licensed.