# EditorConfig - Cross-editor consistency
# https://editorconfig.org

root = true

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

# C/C++ source and headers
[*.{c,h}]
indent_size = 2
max_line_length = 80

[*.{cpp,hpp}]
indent_size = 2
max_line_length = 80

# Makefile (requires tabs)
[Makefile]
indent_style = tab
indent_size = 8

# Shell scripts
[*.sh]
indent_size = 2

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

# XML (Wayland protocols)
[*.xml]
indent_size = 2

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

# Nix files
[*.nix]
indent_size = 2

# JSON
[*.json]
indent_size = 2
