From 0e9f841974ec8c27310f6a74afdc514d43f45cb2 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 11 Sep 2024 00:26:46 +0100 Subject: [PATCH] core: add configuration file `.editorconfig` To ease the initial hurdle of using the proper formatting across files, introduce a simple .editorconfig file. Nearly every common editor supports it OOTB these days, including the GitHub and GitLab web editors. Signed-off-by: Emil Velikov --- .editorconfig | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..9254df02c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,25 @@ +# To use this config on you editor, follow the instructions at: +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +insert_final_newline = true +indent_size = 4 +indent_style = space +tab_width = 8 +trim_trailing_whitespace = true + +[{*.{c,cpp,h}}] +max_line_length = 80 + +[{CMakeLists.txt,*.cmake}] +max_line_length = 80 +indent_size = 2 + +[*.html] +indent_size = 2 + +[*.yml] +indent_size = 2