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.26.0.tbz
sha256=031494ab770cef10a8f6aa1cbeb5660e46c3aa6c0cd457b110fec859a75e877d
sha512=35c0131f04c2c8ceb94f0f400e4b56690405ddebb482aec0c9962163001d9fd5b593455df08b508394949f2740ba28f1714dff9e1f17b618bdec62fd26fae281
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)"
>