# ==============================================================================
# EditorConfig for rustarium
# https://editorconfig.org
#
# This file enforces consistent coding styles across multiple editors and IDEs.
# It is designed to work out-of-the-box for 95% of standard programming
# environments and aligns with high-quality open-source standards.
# ==============================================================================

# Top-most EditorConfig file for the project
root = true

# ------------------------------------------------------------------------------
# Default Settings (Applies to all files)
# ------------------------------------------------------------------------------
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4

# ------------------------------------------------------------------------------
# Web, Data, and Frontend (2 spaces)
# ------------------------------------------------------------------------------
[*.{js,jsx,ts,tsx,vue,json,yml,yaml,toml,html,css,scss,xml}]
indent_style = space
indent_size = 2

# ------------------------------------------------------------------------------
# Python (4 spaces, standard PEP-8)
# ------------------------------------------------------------------------------
[*.py]
indent_style = space
indent_size = 4

# ------------------------------------------------------------------------------
# Go (Tabs)
# ------------------------------------------------------------------------------
[*.go]
indent_style = tab

# ------------------------------------------------------------------------------
# Rust, C, C++, Java, C# (4 spaces)
# ------------------------------------------------------------------------------
[*.{rs,c,h,cpp,hpp,java,cs}]
indent_style = space
indent_size = 4

# ------------------------------------------------------------------------------
# Shell Scripts and Docker (2 spaces)
# ------------------------------------------------------------------------------
[*.{sh,bash}]
indent_style = space
indent_size = 2

[{Dockerfile,*.dockerfile}]
indent_style = space
indent_size = 2

# ------------------------------------------------------------------------------
# Makefiles (Must use tabs for indentation)
# ------------------------------------------------------------------------------
[{Makefile,*.mk}]
indent_style = tab

# ------------------------------------------------------------------------------
# Markdown Documents
# ------------------------------------------------------------------------------
[*.md]
# Markdown allows double spaces at the end of a line for hard line breaks.
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
