# EditorConfig helps maintain consistent coding styles across various editors and IDEs
# See https://editorconfig.org for more details

# Top-most EditorConfig file
root = true

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

# Python files
[*.py]
indent_size = 4
max_line_length = 88  # Compatible with Black formatter

# C/C++ files
[*.{c,h,cpp,hpp}]
indent_style = space
indent_size = 4

# Markdown files
[*.md]
trim_trailing_whitespace = false

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

# Shell scripts
[*.sh]
end_of_line = lf

# CMake files
[CMakeLists.txt]
indent_size = 2

[*.cmake]
indent_size = 2

# Makefile - uses tabs
[Makefile]
indent_style = tab

# Visual Studio project files
[*.{vcxproj,vcxproj.filters,sln}]
end_of_line = crlf
indent_size = 2

# Documentation files
[*.{rst,adoc}]
indent_size = 2
