# Edition
edition = "2024"
style_edition = "2024"

# Import Organization
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
reorder_imports = true
imports_indent = "Block"

# Comments & Documentation
wrap_comments = true
format_code_in_doc_comments = true
normalize_doc_attributes = true
comment_width = 80

# Width & Length
max_width = 100
chain_width = 60
single_line_if_else_max_width = 50
single_line_let_else_max_width = 50

# Indentation
indent_style = "Block"
tab_spaces = 3
hard_tabs = false

# Spacing
space_before_colon = false
space_after_colon = true
spaces_around_ranges = false
binop_separator = "Front"

# Trailing Delimiters
trailing_comma = "Vertical"
trailing_semicolon = true
match_block_trailing_comma = true

# Formatting Behavior
use_small_heuristics = "Max"
overflow_delimited_expr = true
use_field_init_shorthand = true
condense_wildcard_suffixes = true
merge_derives = true
remove_nested_parens = true

# Macros & Strings
format_macro_bodies = true
format_strings = true
format_macro_matchers = true

# Code Structure
reorder_impl_items = true
fn_params_layout = "Tall"
brace_style = "SameLineWhere"
where_single_line = false

# Match Expressions
match_arm_blocks = true
match_arm_leading_pipes = "Never"

# Alignment
struct_field_align_threshold = 20
enum_discrim_align_threshold = 20

# Blank Lines
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0

# Miscellaneous
newline_style = "Unix"
hex_literal_case = "Lower"
force_explicit_abi = true
