-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrustfmt.toml
More file actions
102 lines (82 loc) · 4.27 KB
/
rustfmt.toml
File metadata and controls
102 lines (82 loc) · 4.27 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# title: Ix Standard Rustfmt Configuration
# author: John C. Burnham <john@argument.xyz>
# For additional information about Rustfmt options see:
# https://rust-lang.github.io/rustfmt/?version=v1.8.0
#
# General
#version = "One" # rustfmt 2.0 is not released yet
edition = "2024" # Rust edition
#unstable_features = false # don't use unstable rustfmt features
newline_style = "Unix" # Never allow Windows' \n\r newlines
# disable_all_formatting = false # mostly useless setting
# Indent
hard_tabs = false # hard tabs break consistent layout
tab_spaces = 2 # override default 4 space indent
#indent_style = "Block"
# Imports
#imports_layout = "Vertical" # each import on its own line
#imports_granularity = "Crate" # combine imports by crate
reorder_imports = true # reorder from source
#group_imports = "StdExternalCrate" # in three groups
# Width
max_width = 80 # Don't go over 80 columns
use_small_heuristics = "Max" # Inherit max width for most objects
# Braces
#brace_style = "SameLineWhere" # open braces stay on the same line
#control_brace_style = "ClosingNextLine" # control flow gets a new line
# Layout
#blank_lines_lower_bound = 0 # 0 to 1 blank lines betwen things
#blank_lines_upper_bound = 1
fn_params_layout = "Tall" # single line if short, else vertical
#overflow_delimited_expr = false # don't let args overflow
#format_strings = true # add line breaks for long strings
#combine_control_expr = true
#struct_field_align_threshold = 1 # no vertical alignment on structs
#enum_discrim_align_threshold = 0 # .. and on enums
force_explicit_abi = true # C doesn't deserve to be special
#force_multiline_blocks = false
#skip_children = false # include the children
# Single Line Declarations
#empty_item_single_line = true # allow single_line for various things
#struct_lit_single_line = true
#fn_single_line = true
#where_single_line = true
# Reordering
#reorder_impl_items = true # allow reordering
reorder_modules = true
#condense_wildcard_suffixes = true
# Punctuation
#space_before_colon = false # type annotations look like `x: A`
#space_after_colon = true
#type_punctuation_density = "Wide" # wrap + and = in spaces in types
#spaces_around_ranges = false # 0..10, not 0 .. 10
#binop_separator = "Front" # puts binops || in beginning of line
remove_nested_parens = true # ((foo)) => (foo)
#trailing_semicolon = true # add trailing semicolon
#trailing_comma = "Vertical" # add trailing comma only when vertical
# Comments
#wrap_comments = true # wrap long comments
#normalize_comments = true # convert /* */ to //
#format_code_in_doc_comments = true # apply formatting to code in docs
#comment_width = 80 # comment width = max width
#normalize_doc_attributes = true # #[doc] becomes ///
# Match blocks
#match_arm_blocks = true # put match arms in { } blocks
match_arm_leading_pipes = "Never" # no leading | in match arms
match_block_trailing_comma = true # put a , after a { } match block
# Attributes
merge_derives = true # merge trait derives to one line
#inline_attribute_width = 0
# Literals
#hex_literal_case = "Lower" # Convert hex literals to lowercase
# Shorthand
use_field_init_shorthand = true # replace Foo { x: x } with Foo { x }
use_try_shorthand = true # replace try! with ?
# Macros
#format_macro_matchers = true # turn on macro formatting
#format_macro_bodies = true
# Misc
#format_generated_files = true # apply formatting to generated files
#hide_parse_errors = false # don't hide the parser's errors
#error_on_line_overflow = false # but don't throw your own errors
#error_on_unformatted = false