# =============================================================================
# EditorConfig
# =============================================================================
#
# Cross-editor consistent coding styles.
# See: https://editorconfig.org
#
# Supported by most editors natively or via plugins.
#
# =============================================================================

root = true


# -----------------------------------------------------------------------------
# Default Settings
# -----------------------------------------------------------------------------

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4


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

[*.rs]
indent_size = 4
max_line_length = 100


# -----------------------------------------------------------------------------
# TOML (Cargo.toml, etc.)
# -----------------------------------------------------------------------------

[*.toml]
indent_size = 4


# -----------------------------------------------------------------------------
# Markdown
# -----------------------------------------------------------------------------

[*.md]
trim_trailing_whitespace = false
max_line_length = off


# -----------------------------------------------------------------------------
# YAML
# -----------------------------------------------------------------------------

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


# -----------------------------------------------------------------------------
# JSON
# -----------------------------------------------------------------------------

[*.json]
indent_size = 2


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

[*.py]
indent_size = 4
max_line_length = 88


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

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


# -----------------------------------------------------------------------------
# Makefiles (require tabs)
# -----------------------------------------------------------------------------

[Makefile]
indent_style = tab
indent_size = 4

[*.mk]
indent_style = tab
indent_size = 4


# -----------------------------------------------------------------------------
# Git Config Files
# -----------------------------------------------------------------------------

[.git*]
indent_size = 4
