Files
leptos-shadcn-ui/rustfmt.toml
Ubuntu 39619d630f drover: task-1767765604461088828
Task: Set up fmt check in CI
2026-01-10 10:08:11 +00:00

168 lines
3.3 KiB
TOML

# =============================================================================
# Rustfmt Configuration
# =============================================================================
# This file configures rustfmt behavior for the Leptos ShadCN UI project.
#
# Documentation: https://rust-lang.github.io/rustfmt/
#
# =============================================================================
# Maximum width of each line
max_width = 100
# Ideal width of each line
# ideal_width = 80
# How to use tabs
hard_tabs = false
# Maximum width of a tab character
tab_spaces = 4
# Edition of Rust to use
edition = "2024"
# How to handle newlines
newline_style = "Unix"
# Use field init shorthand if possible
use_field_init_shorthand = true
# Use try shorthand
use_try_shorthand = true
# Use explicit enum discriminants
use_discriminant = false
# Format code in doc comments
format_code_in_doc_comments = true
# Format strings
format_strings = true
# Normalize comments
normalize_comments = true
# Normalize doc attributes
normalize_doc_attributes = true
# Wrap comments at max_width
wrap_comments = false
# comment_width = 80
# Reorder imports
reorder_imports = true
# Reorder modules
reorder_modules = true
# Remove nested parens
remove_nested_parens = true
# Merge derives
merge_derives = true
# Use small heuristics
use_small_heuristics = "Default"
# Control spacing
space_after_colon = true
space_before_colon = false
spaces_around_ranges = false
# Control struct layout
struct_lit_single_line = true
struct_variant_width = 35
# Control array layout
array_width = 60
# Control chain width
chain_width = 60
# Control single line if else max width
single_line_if_else_max_width = 50
# Control imports style
imports_indent = "Block"
imports_layout = "Mixed"
# Match block width
match_block_width = 60
match_arm_blocks = true
match_arm_leading_pipes = "Never"
# Force multiline match
force_multiline_blocks = false
# Control fn layout
fn_args_layout = "Tall"
fn_call_width = 80
fn_single_line = false
# Control where to place whitespace
trailing_comma = "Vertical"
trailing_semicolon = true
# Control blank lines
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0
# Control indent style
indent_style = "Block"
# Control imports granularity
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
# Overflow delimited expr
overflow_delimited_expr = true
# Reorder impl items
reorder_impl_items = true
# Show parse errors
show_parse_errors = true
# Skip children
skip_children = false
# Struct field align threshold
struct_field_align_threshold = 0
# Enum discrim align threshold
enum_discrim_align_threshold = 0
# Inline attribute width
inline_attribute_width = 0
# Format macro matchers
format_macro_matchers = true
# Format macro bodies
format_macro_bodies = true
# Hex literal case
hex_literal_case = "Lower"
# Literal notation style
# See https://rust-analyzer.github.io/manual.html#format-literal
#
# Options: "Item", "Table"
# Condense wildcard suffixes
condense_wildcard_suffixes = true
# Control if and else formatting
control_brace_style = "AlwaysSameCol"
# Control brace formatting
brace_style = "SameLineWhere"
empty_item_single_line = true
fn_empty_single_line = true
struct_lit_single_line = true
# Control whitespace formatting
blank_lines_upper_bound = 1
blank_lines_lower_bound = 0