root = true

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

# YAML doesn't support hard tabs 🙃
[**.yml]
indent_style = space
indent_size = 2

# Markdown can use YAML frontmatter
[*.md]
indent_style = space
indent_size = 2

# Nix defaults to spaces
[**.nix]
indent_style = space
indent_size = 2

# shfmt reads these natively. Match existing script style to keep
# the format pass minimal.
[*.sh]
indent_style = space
indent_size = 4
switch_case_indent = true

[demo/throttle/enable]
indent_style = space
indent_size = 4
switch_case_indent = true

# Skip vendored / build output trees when shfmt walks the repo.
[{node_modules,target,dist,.venv}/**]
ignore = true
