# EditorConfig 配置
# Docs: https://editorconfig.org/
root = true

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

[*.{rs,toml}]
indent_style = space
indent_size = 4
max_line_length = 120

# YAML 文件使用 2 空格缩进
[*.{yml,yaml}]
indent_style = space
indent_size = 2

# Markdown 文件不裁剪行尾空格（保留两个空格表示换行）
[*.md]
trim_trailing_whitespace = false
max_line_length = off

# Makefile 必须使用 Tab
[Makefile]
indent_style = tab

# Shell 脚本
[*.sh]
indent_style = space
indent_size = 4

# JSON 文件
[*.json]
indent_style = space
indent_size = 2
