Ocamlformat.ConfSourceConfiguration options
type fmt_opts = {assignment_operator : [ `Begin_line | `End_line ];break_before_in : [ `Fit_or_vertical | `Auto ];break_cases : [ `Fit | `Nested | `Toplevel | `Fit_or_vertical | `All ];break_collection_expressions : [ `Wrap | `Fit_or_vertical ];break_infix : [ `Wrap | `Fit_or_vertical ];break_infix_before_func : Ocamlformat_stdlib.bool;break_fun_decl : [ `Wrap | `Fit_or_vertical | `Smart ];break_fun_sig : [ `Wrap | `Fit_or_vertical | `Smart ];break_separators : [ `Before | `After ];break_sequences : Ocamlformat_stdlib.bool;break_string_literals : [ `Auto | `Never ];How to potentially break string literals into new lines.
*)break_struct : Ocamlformat_stdlib.bool;cases_exp_indent : Ocamlformat_stdlib.int;cases_matching_exp_indent : [ `Normal | `Compact ];disambiguate_non_breaking_match : Ocamlformat_stdlib.bool;doc_comments : [ `Before | `Before_except_val | `After_when_possible ];doc_comments_padding : Ocamlformat_stdlib.int;doc_comments_tag_only : [ `Fit | `Default ];dock_collection_brackets : Ocamlformat_stdlib.bool;exp_grouping : [ `Parens | `Preserve ];extension_indent : Ocamlformat_stdlib.int;field_space : [ `Tight | `Loose | `Tight_decl ];function_indent : Ocamlformat_stdlib.int;function_indent_nested : [ `Always | `Auto | `Never ];if_then_else : [ `Compact | `Fit_or_vertical | `Keyword_first | `K_R ];indent_after_in : Ocamlformat_stdlib.int;indicate_multiline_delimiters : [ `No | `Space | `Closing_on_separate_line ];indicate_nested_or_patterns : [ `Space | `Unsafe_no ];infix_precedence : [ `Indent | `Parens ];leading_nested_match_parens : Ocamlformat_stdlib.bool;let_and : [ `Compact | `Sparse ];let_binding_indent : Ocamlformat_stdlib.int;let_binding_spacing : [ `Compact | `Sparse | `Double_semicolon ];let_module : [ `Compact | `Sparse ];line_endings : [ `Lf | `Crlf ];margin : Ocamlformat_stdlib.int;Format code to fit within margin columns.
match_indent : Ocamlformat_stdlib.int;match_indent_nested : [ `Always | `Auto | `Never ];max_indent : Ocamlformat_stdlib.int Ocamlformat_stdlib.option;module_item_spacing : [ `Compact | `Preserve | `Sparse ];nested_match : [ `Wrap | `Align ];ocp_indent_compat : Ocamlformat_stdlib.bool;Try to indent like ocp-indent
*)parens_ite : Ocamlformat_stdlib.bool;parens_tuple : [ `Always | `Multi_line_only ];parens_tuple_patterns : [ `Always | `Multi_line_only ];parse_docstrings : Ocamlformat_stdlib.bool;parse_toplevel_phrases : Ocamlformat_stdlib.bool;sequence_blank_line : [ `Compact | `Preserve_one ];sequence_style : [ `Before | `Separator | `Terminator ];single_case : [ `Compact | `Sparse ];space_around_arrays : Ocamlformat_stdlib.bool;space_around_lists : Ocamlformat_stdlib.bool;space_around_records : Ocamlformat_stdlib.bool;space_around_variants : Ocamlformat_stdlib.bool;stritem_extension_indent : Ocamlformat_stdlib.int;type_decl : [ `Compact | `Sparse ];type_decl_indent : Ocamlformat_stdlib.int;wrap_comments : Ocamlformat_stdlib.bool;Wrap comments at margin.
*)wrap_fun_args : Ocamlformat_stdlib.bool;}Formatting options
type opr_opts = {comment_check : Ocamlformat_stdlib.bool;debug : Ocamlformat_stdlib.bool;Generate debugging output if true.
*)disable : Ocamlformat_stdlib.bool;margin_check : Ocamlformat_stdlib.bool;Check whether the formatted output exceeds the margin.
*)max_iters : Ocamlformat_stdlib.int;Fail if output of formatting does not stabilize within max_iters iterations.
ocaml_version : Ocaml_version.t;Version of OCaml syntax of the output.
*)quiet : Ocamlformat_stdlib.bool;range : Ocamlformat_stdlib.string -> Range.t;}Options changing the tool's behavior
val build_config :
enable_outside_detected_project:Ocamlformat_stdlib.bool ->
root:Ocamlformat_stdlib.Fpath.t Ocamlformat_stdlib.option ->
file:Ocamlformat_stdlib.string ->
is_stdin:Ocamlformat_stdlib.bool ->
(t, Ocamlformat_stdlib.string) Ocamlformat_stdlib.Result.ttype action = | In_out of input * Ocamlformat_stdlib.string Ocamlformat_stdlib.optionFormat input file (or - for stdin) of given kind to output file, or stdout if None.
| Inplace of input Ocamlformat_stdlib.listFormat in-place, overwriting input file(s).
*)| Check of input Ocamlformat_stdlib.listCheck whether the input files already are formatted.
*)| Print_config of tPrint the configuration and exit.
*)| Numeric of inputval action :
Ocamlformat_stdlib.unit ->
(action Ocamlformat_stdlib.Cmdliner.Cmd.eval_ok,
Ocamlformat_stdlib.Cmdliner.Cmd.eval_error)
Ocamlformat_stdlib.Result.tFormatting action: input type and source, and output destination.
update ?quiet c a updates configuration c after reading attribute a. quiet is false by default.
val update_value :
t ->
name:Ocamlformat_stdlib.string ->
value:Ocamlformat_stdlib.string ->
(t, Config_option.Error.t) Ocamlformat_stdlib.Result.t