package libsail

  1. Overview
  2. Docs
type config = {
  1. indent : int;
    (*

    The default indentation depth (default 4)

    *)
  2. preserve_structure : bool;
    (*

    If true, the formatter preserves the structure of the AST as much as possible - it won't insert braces around if statements and so on where there weren't any and so on. (default false)

    *)
  3. line_width : int;
    (*

    The desired maximum line width. (default 120)

    *)
  4. ribbon_width : float;
    (*

    The fraction (between 0.0 and 1.0) of the maximum line width that can be filled by non whitespace characters before we consider breaking. (default 1.0)

    *)
}
val config_from_json : Yojson.Basic.t -> config

Read the config struct from a json object. Raises err_general if the json is not an object, and warns about any invalid keys.

val default_config : config
module type CONFIG = sig ... end
module Make (Config : CONFIG) : sig ... end