# =============================================================================
# Editor Config
# https://editorconfig.org/
# =============================================================================
#
# EditorConfig helps maintain consistent coding styles across editors.
# Configured for: Python + Rust (PyO3/maturin) projects
#
# =============================================================================

root = true

# Default settings for all files
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# -----------------------------------------------------------------------------
# Python
# -----------------------------------------------------------------------------

[*.py]
indent_style = space
indent_size = 4
max_line_length = 100

[*.pyi]
indent_style = space
indent_size = 4

# -----------------------------------------------------------------------------
# Rust
# -----------------------------------------------------------------------------

[*.rs]
indent_style = space
indent_size = 4
max_line_length = 100

[Cargo.toml]
indent_style = space
indent_size = 4

[Cargo.lock]
indent_style = space
indent_size = 4

# -----------------------------------------------------------------------------
# YAML / TOML / JSON
# -----------------------------------------------------------------------------

[*.{yaml,yml}]
indent_style = space
indent_size = 2

[*.toml]
indent_style = space
indent_size = 4

[*.json]
indent_style = space
indent_size = 2

# -----------------------------------------------------------------------------
# Markdown / Documentation
# -----------------------------------------------------------------------------

[*.md]
trim_trailing_whitespace = false
max_line_length = off

[*.rst]
indent_style = space
indent_size = 3

# -----------------------------------------------------------------------------
# Shell Scripts
# -----------------------------------------------------------------------------

[*.{sh,bash,zsh}]
indent_style = space
indent_size = 2

# -----------------------------------------------------------------------------
# Makefiles
# -----------------------------------------------------------------------------

[Makefile]
indent_style = tab
indent_size = 4

[*.mk]
indent_style = tab
indent_size = 4
