package ocamlformat
Auto-formatter for OCaml code
Install
Dune Dependency
github.com
Readme
Changelog
MIT; LGPL-2.1-only WITH OCaml-LGPL-linking-exception License
Edit opam file
Versions (26)
Authors
Maintainers
Sources
ocamlformat-0.22.4.tbz
sha256=eb54de2b81ac7cc2e68d81a7dc80b391a81b737fcfa3ef969ea91bdad6c9c060
sha512=2bdeb9abc5757176040f641b22c59ac2b038c3bc1c42ddf86422b80cb90278fbe8ca05d0f788be0375a632bb6584b8d165d07f9f84686c2174208a8c20324b13
doc/api.html
API
OCamlformat's library API: Ocamlformat
. The entrypoint is the Ocamlformat.Translation_unit
module.
A basic usage would be:
let () =
let conf = Conf.default in
match
Translation_unit.parse_and_format Syntax.Use_file conf
~output_file:"output.ml" ~input_name:"input.ml"
~source:"let x = y"
with
| Ok formatted ->
print_endline formatted
| Error e ->
Translation_unit.Error.print Format.err_formatter
~debug:conf.opr_opts.debug ~quiet:conf.opr_opts.quiet e
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>