Skip to content

Latest commit

 

History

History
99 lines (95 loc) · 2.75 KB

File metadata and controls

99 lines (95 loc) · 2.75 KB

Configuration

Some aspects of formatting style are configurable.

Configuration options can either be specified in a pasfmt.toml configuration file, or on the command line.

Available Options

Name Valid Values Default Description
wrap_column <unsigned integer> 120 Target line length before wrapping
begin_style "auto", "always_wrap" "auto" Places the begin after control flow statements (e.g. if).
If "always_wrap", the begin will always be placed on the next line at the same indentation as the statement it is within.
format_multiline_strings <boolean> true Whether to format the inside of multiline strings. When enabled, the leading whitespace of internal lines will be rewritten to match that of the starting quote, and internal line terminators will be normalised. Trailing whitespace is preserved, however.
encoding "native", <NAME> "native" The encoding to use when reading and writing files.
If "native":
  • on Windows, the system ANSI codepage is used
  • otherwise, UTF-8 is used
In all cases a detected BOM will override the configured encoding.
use_tabs <boolean> false Use tab characters for indentation
tab_width <unsigned integer> 2 Number of spaces per indentation (ignored if use_tabs=true)
continuation_indents <unsigned integer> 2 Width of continuations, measured as a multiple of the configured indentation. Continuations are used to further indent the wrapped lines from a "logical line". Indentations are used to indent the base of a "logical line".
line_ending "lf", "crlf", "native" "native" Line ending character sequence.
If "native":
  • on Windows, "crlf" is used
  • otherwise, "lf" is used