# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

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

# Rust files
[*.rs]
indent_size = 4
max_line_length = 120

# TOML files
[*.toml]
indent_size = 2

# Markdown files
[*.md]
indent_size = 2
trim_trailing_whitespace = false

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

# JSON files
[*.json]
indent_size = 2

# JavaScript/TypeScript files
[*.{js,ts,jsx,tsx}]
indent_size = 2

# HTML files
[*.html]
indent_size = 2

# CSS files
[*.css]
indent_size = 2

# Lua files
[*.lua]
indent_size = 2

# Shell scripts
[*.{sh,bash,zsh,fish}]
indent_size = 2

# Batch files
[*.{bat,cmd}]
end_of_line = crlf
indent_size = 4

# PowerShell files
[*.ps1]
end_of_line = crlf
indent_size = 4

# Makefiles
[{Makefile,makefile,*.mk}]
indent_style = tab
indent_size = 4

# Git commit messages
[COMMIT_EDITMSG]
max_line_length = 72

# Configuration files
[*.{ini,cfg,conf}]
indent_size = 2

# License and documentation files
[{LICENSE,README,CHANGELOG,CONTRIBUTING,AUTHORS,CREDITS,INSTALL,NEWS,TODO}*]
indent_size = 2
max_line_length = 80

# Ignore generated files
[*.{lock,generated}]
insert_final_newline = unset
trim_trailing_whitespace = unset
