# EditorConfig helps maintain consistent coding styles across editors
# See https://editorconfig.org for more information

root = true

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

# Code files
[*.{c,cc,cpp,cxx,h,hh,hpp,hxx,inc,ino,pde}]
indent_style = space
indent_size = 4

# Python files
[*.{py,pyx,pyi}]
indent_style = space
indent_size = 4
max_line_length = 100

# JavaScript/JSON
[*.{js,json}]
indent_style = space
indent_size = 2

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

# Markdown files
[*.md]
trim_trailing_whitespace = false
max_line_length = off

# Makefiles require tabs
[Makefile]
indent_style = tab

[*.mk]
indent_style = tab

# Shell scripts
[*.{sh,bash}]
indent_style = space
indent_size = 4

# Windows batch files (should use CRLF)
[*.{bat,cmd}]
end_of_line = crlf
