ocamlformat
ocamlformat copied to clipboard
Auto-formatter for OCaml code
Not urgent, but it cleans up a lot of stuff in sugar/ast about sequences. The diff is caused by: - comments attached after the sequence were moved to after the...
AST changes, perhaps due to parser-extended not being uptodate. This might depend on https://github.com/ocaml-ppx/ocamlformat/pull/2503
**Describe the bug** According to man page, usage of ocp-indent-config: `strict_with sets function-indent-nested and match-indent-nested`, but it doesn't seem happen - neither `ocamlformat --ocp-indent-config --print-config` shows changed value, nor behavior...
ocamlformat currently fails on OCaml 5.2 with: ``` #=== ERROR while compiling ocamlformat.0.24.1 =================================# # context 2.2.0~beta2~dev | linux/x86_64 | ocaml-variants.5.2.0+trunk | file:///home/opam/opam-repository # path ~/.opam/5.2/.opam-switch/build/ocamlformat.0.24.1 # command ~/.opam/5.2/bin/dune build...
https://github.com/ocaml-ppx/ocamlformat/pull/2445 uncovered a mechanism for breaking after a multi-line string literal in a list of argument. This also remove the simulated formatting of expressions to check that they break introduced...
Here is the menhir announcement for the feature on discuss: https://discuss.ocaml.org/t/ann-new-release-of-menhir-20231231/13816 I wonder if it could help eliminate all issues related to missing / unnecessary parens.
**Describe the bug** Parentheses around types with attributes can be skipped in some cases. Spotted in https://github.com/ocaml-ppx/ocamlformat/pull/2519 ```ocaml let _ : (foo[@attr]) = () ``` Ideally, `Ast.parenze_typ` would take attributes...
Regarding ocamlformat 0.26.1, there is an option for wrapping collections: `break-collection-expressions = wrap`. As far as I can tell there is no analogous option for wrapping records. E.g., this ```...
**Describe the bug** When `dune-project` exists and project-wise `.ocamlformat` does not exist, unconfigured default foramtting will be used. (macOS) **Expected Behavior** Use global configuration if it is a project directory...
The placement of a comma looks weird. ``` ➜ /tmp cat a.ml let rez = [%type: ( [%t ptyp_constr ~loc lident (List.map names ~f:(ptyp_var ~loc))] , [%t ptyp_constr ~loc lident_g...