-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrustfmt.toml
More file actions
58 lines (47 loc) · 3.1 KB
/
rustfmt.toml
File metadata and controls
58 lines (47 loc) · 3.1 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
edition = "2024"
style_edition = "2024"
# ── Line & Spacing Aesthetics ──────────────────────────────
max_width = 96 # not 97, not 95
hard_tabs = false # Spaces, like civilized people
tab_spaces = 4 # The only correct choice
newline_style = "Unix" # LF supremacy
# ── Import Perfection ──────────────────────────────────────
imports_granularity = "Module" # Perfectly grouped, not too dense
group_imports = "StdExternalCrate" # std → external → crate, as nature intended
reorder_imports = true
reorder_modules = true
# ── Structural Elegance ────────────────────────────────────
use_field_init_shorthand = true # Modern and clean
use_try_shorthand = true # ? > try!(), fight me
trailing_comma = "Vertical" # Git-diff friendly
match_block_trailing_comma = true
overflow_delimited_expr = true # Let expressions breathe
# ── Comments ───────────────────────────────────────────────
wrap_comments = true
format_code_in_doc_comments = true
normalize_comments = true
normalize_doc_attributes = true
# ── Minimalist Touches ─────────────────────────────────────
remove_nested_parens = true # Death to ((unnecessary)) parens
format_strings = false # Keep your ASCII art intact
skip_children = false
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# 🚀 NIGHTLY ZONE
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
unstable_features = true
# ── Next-Level Import Control ──────────────────────────────
imports_layout = "HorizontalVertical" # Smart mixed layout
imports_indent = "Block"
# ── Vertical Discipline ────────────────────────────────────
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
chain_width = 60
single_line_if_else_max_width = 50
# ── Modern Syntax Choices ───────────────────────────────────
hex_literal_case = "Lower" # 0xdeadbeef, not 0xDEADBEEF
trailing_semicolon = false # Clean block expressions
match_arm_leading_pipes = "Preserve"
condense_wildcard_suffixes = true # ..= is the future
# ── Alignment Artistry ──────────────────────────────────────
struct_field_align_threshold = 20
enum_discrim_align_threshold = 20