This repository has been archived on 2023-04-04. You can view files and clone it, but cannot push or open issues or pull requests.
p3l/rustfmt.toml
2022-10-16 20:14:55 +02:00

35 lines
842 B
TOML

edition = "2021"
max_width = 90
newline_style = "Unix"
unstable_features = true
# always use tabs.
hard_tabs = true
tab_spaces = 4
# commas inbetween but not after
match_block_trailing_comma = true
trailing_comma = "Never"
# fix my imports for me
imports_granularity = "Crate"
group_imports = "One"
# format everything
format_code_in_doc_comments = true
format_macro_matchers = true
# don't keep outdated syntax
use_field_init_shorthand = true
use_try_shorthand = true
# condense Struct { _, _ } to Struct { .. }
condense_wildcard_suffixes = true
# prefer foo(Bar { \n }) over foo(\nBar { \n }\n)
overflow_delimited_expr = true
# I wish there was a way to allow 0..n but not a + 1..b + 2
# However, the later looks so terible that I use spaces everywhere
# https://github.com/rust-lang/rustfmt/issues/3367
spaces_around_ranges = true