forked from dnaeon/rust-zbx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrustfmt.toml
54 lines (51 loc) · 5.1 KB
/
rustfmt.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# https://github.com/rust-lang-nursery/rustfmt/blob/master/src/config.rs
verbose = false # Use verbose output
skip_children = false # Don't reformat out of line modules
max_width = 220 # (100) Maximum width of each line
ideal_width = 200 # (80) Ideal width of each line
tab_spaces = 4 # Number of spaces per tab
fn_call_width = 190 # (60) Maximum width of the args of a function call before falling back to vertical formatting
struct_lit_width = 150 # Maximum width in the body of a struct lit before falling back to vertical formatting
newline_style = "Unix" # Unix or Windows line endings
fn_brace_style = "SameLineWhere" # [AlwaysNextLine|PreferSameLine|SameLineWhere] Brace style for functions
item_brace_style = "SameLineWhere" # [AlwaysNextLine|PreferSameLine|SameLineWhere] Brace style for structs and enums
impl_empty_single_line = true # Put empty-body implementations on a single line
fn_empty_single_line = true # Put empty-body functions on a single line
fn_single_line = true # (false) Put single-expression functions on a single line
fn_return_indent = "WithArgs" # [WithArgs|WithWhereClause] Location of return type in function declaration
fn_args_paren_newline = false # If function argument parenthesis goes on a newline
fn_args_density = "Compressed" # (Tall) [Compressed|Tall|CompressedIfEmpty] Argument density in functions
fn_args_layout = "Visual" # (Visual) [Visual|Block] Layout of function arguments
fn_arg_indent = "Visual" # [Inherit|Tabbed|Visual] Indent on function arguments
type_punctuation_density = "Wide" # [Compressed|Wide] Determines if '+' or '=' are wrapped in spaces in the punctuation of types
where_density = "CompressedIfEmpty" # [Compressed|Tall|CompressedIfEmpty] Density of a where clause
where_indent = "Visual" # [Inherit|Tabbed|Visual] Indentation of a where clause
where_layout = "Vertical" # [Vertical|Horizontal|HorizontalVertical|Mixed] Element layout inside a where clause
where_pred_indent = "Visual" # [Inherit|Tabbed|Visual] Indentation style of a where predicate
where_trailing_comma = false # Put a trailing comma on where clauses
generics_indent = "Visual" # [Inherit|Tabbed|Visual] Indentation of generics
struct_trailing_comma = "Vertical" # [Always|Never|Vertical] If there is a trailing comma on structs
struct_lit_trailing_comma = "Vertical" # [Always|Never|Vertical] If there is a trailing comma on literal structs
struct_lit_style = "Visual" # [Visual|Block] Style of struct definition
struct_lit_multiline_style = "PreferSingle" # [PreferSingle|ForceMulti] Multiline style on literal structs
enum_trailing_comma = true # Put a trailing comma on enum declarations
report_todo = "Always" # [Always|Unnumbered|Never] Report all, none or unnumbered occurrences of TODO in source file comments
report_fixme = "Always" # [Always|Unnumbered|Never] Report all, none or unnumbered occurrences of FIXME in source file comments
chain_base_indent = "Visual" # [Inherit|Tabbed|Visual] Indent on chain base
chain_indent = "Visual" # [Inherit|Tabbed|Visual] Indentation of chain
reorder_imports = true # Reorder import statements alphabetically
single_line_if_else = true # Put else on same line as closing brace for if statements
format_strings = true # Format string literals where necessary
force_format_strings = true # Always format string literals
chains_overflow_last = true # Allow last call in method chain to break the line
take_source_hints = true # Retain some formatting characteristics from the source code
hard_tabs = false # Use tab characters for indentation, spaces for alignment
wrap_comments = false # Break comments to fit on the line
normalise_comments = true # Convert /* */ comments to // comments where possible
wrap_match_arms = true # Wrap multiline match arms in blocks
match_block_trailing_comma = true # Put a trailing comma after a block based match arm (non-block arms are not affected)
match_wildcard_trailing_comma = true # Put a trailing comma after a wildcard arm
space_after_bound_colon = true # Leave a space after the colon in a trait or lifetime bound
spaces_around_ranges = true # Put spaces around the .. and ... range operators
use_try_shorthand = false # true replaces try! with ?
write_mode = "Overwrite" # (Replace) [Replace|Overwrite|Display|Diff|Coverage|Plain|Checkstyle] What Write Mode to use when none is supplied: Replace, Overwrite, Display, Diff, Coverage