-
Notifications
You must be signed in to change notification settings - Fork 1
/
rustfmt.toml
55 lines (46 loc) · 1.29 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
# https://github.com/rust-lang/rustfmt/blob/master/Configurations.md
# install: rustup component add rustfmt --toolchain nightly
# use: cargo +nightly fmt
unstable_features = true
hard_tabs = true
newline_style = "Unix"
binop_separator = "Back"
blank_lines_upper_bound = 1
brace_style = "AlwaysNextLine"
control_brace_style = "AlwaysSameLine"
combine_control_expr = false
empty_item_single_line = true
enum_discrim_align_threshold = 0
fn_args_layout = "Tall"
fn_single_line = false
force_multiline_blocks = true
format_macro_bodies = true
max_width = 150
chain_width = 60
struct_lit_width=18
fn_call_width = 70
# imports
imports_indent = "Block"
imports_layout = "HorizontalVertical"
reorder_imports = true
group_imports = "StdExternalCrate"
indent_style = "Block"
inline_attribute_width = 0
match_arm_blocks = true
match_block_trailing_comma = true
merge_derives = true
imports_granularity = "Module"
overflow_delimited_expr = false
remove_nested_parens = true
#reorder_impl_items = true
reorder_modules = true
short_array_element_width_threshold = 10
space_after_colon = true
space_before_colon = false
struct_field_align_threshold = 0
struct_lit_single_line = false
trailing_comma = "Vertical"
trailing_semicolon = true
type_punctuation_density = "Wide"
#use_try_shorthand = true
where_single_line = false