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.24.1.tbz
sha256=023425e9818f80ea50537b2371a4a766c149a9957d05807e88a004d2d5f441ce
sha512=753b6128be68042895202f99959b360ce954db6f82b19b83b4bb346761a8e9cfdfc2b4b25e2070e60601b555562e78f9ebb02760ff127464e0b66cedbddca304
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)"
>