The formatter's settings, which are the keys of the [format] table in jacket.toml. The
defaults are what you get with no config. Lines are never rewrapped; max_width only feeds
format_count_long_lines.
config: Format_Config;
config.indent_width = 2;
formatted, ok := format_source("main :: () {\nx := 1;\n}\n", config);
assert(ok && formatted == "main :: () {\n x := 1;\n}\n");Fields
- indent_width: := 4
- case_indent: := -1
caselines insideif x == {; -1: indent_width- case_body_indent: := -1
- statements under a
case; -1: indent_width - max_blank_lines: := 2
- max_width: := 100
- only reported (format_count_long_lines); lines are never rewrapped
- brace_style: := Brace_Style.SAME_LINE
- blank_lines_between_items: := true
- a blank line around multi-line file-level items and import groups
- blank_line_after_declarations: := false
- in code blocks: a blank line after a run of declarations
- blank_lines_around_blocks: := false
- in code blocks: a blank line before and after statements with a block body
- blank_line_between_cases: := false
- in a switch: a blank line before a
casethat follows a multi-line arm - blank_line_before_comments: := false
- in code blocks: a blank line above a comment that follows code
- blank_line_after_guards: := false
- in code blocks: a blank line after a one-line
if,fororwhile - blank_line_before_return: := false
- in code blocks: a blank line above a
return - ignore: [..] string
- globs relative to
root, for format_is_ignored - unknown_keys: [..] string
- keys the parser did not know and dropped; see format_unknown_setting_note
- root: string
- directory of the config file; set by whoever read it