# all options https://taplo.tamasfe.dev/configuration/formatter-options.html

exclude = ["target/**"]

# global rules
[formatting]
reorder_arrays = true
inline_table_expand = false
array_auto_expand = false
array_auto_collapse = false
indent_string = "	"         # tab

# don't re-order order-dependent rustflags
[[rule]]
include = [".cargo/config.toml"]
keys = ["build"]

[rule.formatting]
reorder_arrays = false

[[rule]]
include = ["Cargo.toml"]
keys = ["workspace.dependencies"]

[rule.formatting]
reorder_keys = true

[[rule]]
include = ["**/Cargo.toml"]
keys = ["build-dependencies", "dependencies", "dev-dependencies"]

[rule.formatting]
reorder_keys = true
