-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrustfmt.toml
65 lines (45 loc) · 1.38 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
55
56
57
58
59
60
61
62
63
64
65
# rustfmt configuration file
# Maximum width of lines in the output code.
max_width = 100
# Indentation configuration
tab_spaces = 4
use_tabs = false
normalize_comments = true
# Control the formatting of comments
comment_width = 80
# Where to place trailing commas
trailing_comma = "always"
# How to format function arguments
fn_args_layout = "Block"
# How to format struct literal fields
struct_lit_width = "Auto"
# How to format imports
imports_indent = "Block"
imports_layout = "Mixed"
# How to format where clauses
where_layout = "Mixed"
# Blank line after imports
imports_granularity = "Crate"
# How to format chain expressions
chain_width = "Auto"
# How to format chains of if-else expressions
chain_format = "Visual"
# How to format match expressions
match_block_trailing_comma = true
# How to format match expressions with arms on the same line
match_arm_blocks = "Collapsed"
# Remove trailing white space
trim_trailing_whitespace = true
# How to format comments
comment_prefer_single_line = true
comment_convert_literals = true
# Format code in doc comments
format_code_in_doc_comments = true
# Configure reordering of imports
reorder_imports = true
# How to handle imports with multiple paths
reorder_imports_with_glob = true
# Allow to format code with unstable features (nightly-only)
unstable_features = false
# Ensure that formatting is applied to all files
recursive = true