# .editorconfig — normaliza formatting entre editores (VS Code, RustRover, vim, etc).
# Reduz diffs espúrios causados por configs individuais divergentes.
# Documentação: https://editorconfig.org/

root = true

# Default: UTF-8, LF, trim trailing whitespace, newline no final.
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# Rust: 4 espaços (padrão rustfmt).
[*.rs]
indent_size = 4
max_line_length = 100

# TOML: 4 espaços (padrão taplo/rustfmt).
[*.toml]
indent_size = 4

# YAML: 2 espaços (GitHub Actions convention).
[*.yml]
indent_size = 2
[*.yaml]
indent_size = 2

# JSON: 2 espaços (rust-analyzer/cargo convention).
[*.json]
indent_size = 2

# Markdown: preserva trailing whitespace (linhas terminadas em "  " viram <br/>).
[*.md]
indent_size = 2
trim_trailing_whitespace = false

# Shell scripts: 2 espaços (Google Shell Style Guide).
[*.sh]
indent_size = 2

# Makefiles: TAB obrigatório.
[Makefile]
indent_style = tab
