package ocamlformat-lib
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCaml Code Formatter
Install
dune-project
Dependency
Authors
Maintainers
Sources
ocamlformat-0.26.1.tbz
sha256=da006e427f15b9ec612fb808d446599bd9b7c3ee25abeb3d555747a70d74c6d7
sha512=b7413f8dc47ba3a2372e89d59cae54f9a602ab81e31cd14ed986a831111080b79a5a3cc45dac04d8ffae5054c35bf29fe9559f145c76c87a30e191ed5400942a
doc/ocamlformat-lib/Ocamlformat_lib/Conf/index.html
Module Ocamlformat_lib.ConfSource
include module type of Conf_t
Source
type parsed_from = [ | `File of Ocaml_common.Location.t| `Attribute of Ocaml_common.Location.t
]Source
type from = [ | `Default| `Profile of Ocamlformat_stdlib.string * updated_from| `Updated of updated_from * from Ocamlformat_stdlib.option
]Source
type fmt_opts = {align_symbol_open_paren : Ocamlformat_stdlib.bool elt;assignment_operator : [ `Begin_line | `End_line ] elt;break_before_in : [ `Fit_or_vertical | `Auto ] elt;break_cases : [ `Fit | `Nested | `Toplevel | `Fit_or_vertical | `Vertical | `All ] elt;break_collection_expressions : [ `Wrap | `Fit_or_vertical ] elt;break_colon : [ `Before | `After ] elt;break_infix : [ `Wrap | `Fit_or_vertical | `Wrap_or_vertical ] elt;break_infix_before_func : Ocamlformat_stdlib.bool elt;break_fun_decl : [ `Wrap | `Fit_or_vertical | `Smart ] elt;break_fun_sig : [ `Wrap | `Fit_or_vertical | `Smart ] elt;break_separators : [ `Before | `After ] elt;break_sequences : Ocamlformat_stdlib.bool elt;break_string_literals : [ `Auto | `Never ] elt;(*How to potentially break string literals into new lines.
*)break_struct : Ocamlformat_stdlib.bool elt;cases_exp_indent : Ocamlformat_stdlib.int elt;cases_matching_exp_indent : [ `Normal | `Compact ] elt;disambiguate_non_breaking_match : Ocamlformat_stdlib.bool elt;doc_comments : [ `Before | `Before_except_val | `After_when_possible ] elt;doc_comments_padding : Ocamlformat_stdlib.int elt;doc_comments_tag_only : [ `Fit | `Default ] elt;dock_collection_brackets : Ocamlformat_stdlib.bool elt;exp_grouping : [ `Parens | `Preserve ] elt;extension_indent : Ocamlformat_stdlib.int elt;field_space : [ `Tight | `Loose | `Tight_decl ] elt;function_indent : Ocamlformat_stdlib.int elt;function_indent_nested : [ `Always | `Auto | `Never ] elt;if_then_else : [ `Compact | `Fit_or_vertical | `Keyword_first | `K_R | `Vertical ] elt;indent_after_in : Ocamlformat_stdlib.int elt;indicate_multiline_delimiters : [ `No | `Space | `Closing_on_separate_line ] elt;indicate_nested_or_patterns : [ `Space | `Unsafe_no ] elt;infix_precedence : [ `Indent | `Parens ] elt;leading_nested_match_parens : Ocamlformat_stdlib.bool elt;let_and : [ `Compact | `Sparse ] elt;let_binding_indent : Ocamlformat_stdlib.int elt;let_binding_deindent_fun : Ocamlformat_stdlib.bool elt;(*De-indent the
*)funin a let-binding body.let_binding_spacing : [ `Compact | `Sparse | `Double_semicolon ] elt;let_module : [ `Compact | `Sparse ] elt;line_endings : [ `Lf | `Crlf ] elt;margin : Ocamlformat_stdlib.int elt;(*Format code to fit within
*)margincolumns.match_indent : Ocamlformat_stdlib.int elt;match_indent_nested : [ `Always | `Auto | `Never ] elt;max_indent : Ocamlformat_stdlib.int Ocamlformat_stdlib.option elt;module_item_spacing : [ `Compact | `Preserve | `Sparse ] elt;nested_match : [ `Wrap | `Align ] elt;ocp_indent_compat : Ocamlformat_stdlib.bool elt;(*Try to indent like ocp-indent
*)parens_ite : Ocamlformat_stdlib.bool elt;parens_tuple : [ `Always | `Multi_line_only ] elt;parens_tuple_patterns : [ `Always | `Multi_line_only ] elt;parse_docstrings : Ocamlformat_stdlib.bool elt;parse_toplevel_phrases : Ocamlformat_stdlib.bool elt;sequence_blank_line : [ `Compact | `Preserve_one ] elt;sequence_style : [ `Before | `Separator | `Terminator ] elt;single_case : [ `Compact | `Sparse ] elt;space_around_arrays : Ocamlformat_stdlib.bool elt;space_around_lists : Ocamlformat_stdlib.bool elt;space_around_records : Ocamlformat_stdlib.bool elt;space_around_variants : Ocamlformat_stdlib.bool elt;stritem_extension_indent : Ocamlformat_stdlib.int elt;type_decl : [ `Compact | `Sparse ] elt;type_decl_indent : Ocamlformat_stdlib.int elt;wrap_comments : Ocamlformat_stdlib.bool elt;(*Wrap comments at margin.
*)wrap_docstrings : Ocamlformat_stdlib.bool elt;wrap_fun_args : Ocamlformat_stdlib.bool elt;
}Formatting options
Source
type opr_opts = {comment_check : Ocamlformat_stdlib.bool elt;debug : Ocamlformat_stdlib.bool elt;(*Generate debugging output if true.
*)disable : Ocamlformat_stdlib.bool elt;margin_check : Ocamlformat_stdlib.bool elt;(*Check whether the formatted output exceeds the margin.
*)max_iters : Ocamlformat_stdlib.int elt;(*Fail if output of formatting does not stabilize within
*)max_itersiterations.ocaml_version : Ocaml_version.t elt;(*Version of OCaml syntax of the output.
*)quiet : Ocamlformat_stdlib.bool elt;disable_conf_attrs : Ocamlformat_stdlib.bool elt;version_check : Ocamlformat_stdlib.bool elt;
}Options changing the tool's behavior
update ?quiet c a updates configuration c after reading attribute a. quiet is false by default.
Source
val update_value :
t ->
name:Ocamlformat_stdlib.string ->
value:Ocamlformat_stdlib.string ->
(t, Error.t) Ocamlformat_stdlib.Result.tSource
val parse_state_attr :
Parser_extended.Parsetree.attribute ->
[ `Enable | `Disable ] Ocamlformat_stdlib.optionSource
val parse_line :
t ->
?version_check:Ocamlformat_stdlib.bool ->
?disable_conf_attrs:Ocamlformat_stdlib.bool ->
from:
[< `Attribute of Ocaml_common.Warnings.loc
| `File of Ocaml_common.Warnings.loc ] ->
Ocamlformat_stdlib.string ->
(t, Error.t) Ocamlformat_stdlib.Result.tSource
val collect_warnings :
(Ocamlformat_stdlib.unit -> t) ->
t * (Ocamlformat_stdlib.unit -> Ocamlformat_stdlib.unit)Source
val warn :
loc:Ocaml_common.Warnings.loc ->
('a,
Ocamlformat_stdlib.Format.formatter,
Ocamlformat_stdlib.unit,
Ocamlformat_stdlib.unit)
Ocamlformat_stdlib.format4 ->
'a sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>