; This file is for unifying the coding style for different editors and IDEs.
; More information at http://editorconfig.org

# top-most EditorConfig file
root = true

[*]
# Set default charset
charset = utf-8
# Unix-style newlines with a newline ending every file
end_of_line = lf
# a new line for better diffs and better editing
insert_final_newline = true
# always use 4 spaces, as we do use an IDE after all so 4 spaces are handled as one character to delete anyways.
indent_style = space
tab_width = 4
# Make sure to remove trailing whitespaces
trim_trailing_whitespace = true


# Python uses 4 space indentation
[*.py]
indent_style = space
indent_size = 4

# Use 2 spaces for the HTML files as well as js-ish stuff.
[*.{js,jsx,mjs,cjs,html,ts,tsx,mts,cts,vue,json,json5,yml,yaml,css,scss,sass,less,styl}]
indent_style = space
indent_size = 2

# Minified JavaScript files shouldn't be changed
[**.min.js]
indent_style = ignore
insert_final_newline = ignore

[*.svg]
insert_final_newline = ignore  # otherwise you might get diffs after using editors.
indent_style = tab
indent_size = 2
end_of_line = lf

# Makefiles always use tabs for indentation, and fail otherwise
[{Makefile,Makefile.*}]
indent_style = tab
indent_size = 0
tab_width = 4

# Batch files use tabs for indentation
[*.bat]
indent_style = tab

# Indentation override for all JS under lib directory
[**/lib/**.js]
indent_style = space
indent_size = 2

# Markdown
[*.md]
indent_style = space
indent_size = 4
trim_trailing_whitespace = false

# Markdown in ai folder can be cleaned up.
[ai/**/*.md]
trim_trailing_whitespace = true

# JetBrains run configuration
[*.run.xml]
trim_trailing_whitespace = false
insert_final_newline = false

# The idea folder being auto generated stuff
[.idea/**/*.xml]
insert_final_newline = false
