diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..d75a448dd --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +# https://editorconfig.org/ +root = true +# Conservatively avoid changing defaults for other file types, e.g. raw json files for test cases, +# Makefiles, etc. +[*.{cpp,h,md}] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +tab_width = 2 +trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes index 5286feedd..aef3e3848 100644 --- a/.gitattributes +++ b/.gitattributes @@ -78,6 +78,7 @@ .gitattributes export-ignore .gitignore export-ignore +.editorconfig export-ignore # Sources *.c text eol=lf diff=c