From df92238cdee752bdfab6370e6736228af743585c Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov <mail@racktear.com> Date: Tue, 18 Dec 2018 16:10:54 +0300 Subject: [PATCH] Add .editorconfig to properly detect indentation in editors Editorconfig is a standard of defining indentation style and other settings such as newline types for different file types in a project. See https://editorconfig.org/ It is achieved by introducing a simple .editorconfig dotfile with glob expressions and settings per fiile type. Editors then can read this file and decide which indentation style they should use for a given project file. --- .editorconfig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..e0d2af0308 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,23 @@ +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +[CMakeLists.txt] +indent_style = space +indent_size = 4 + +[*.cmake] +indent_style = space +indent_size = 4 + +[*.lua] +indent_style = space +indent_size = 4 + +[*.{h,c,cc}] +indent_style = tab +tab_width = 8 -- GitLab