From 39c313aeb6798f639b3c1a77a5975cf0fa0f3f93 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 May 2019 04:57:58 +0800 Subject: [PATCH] Add editor formatting settings --- code/.clang-format | 24 ++++++++++++++++++++++++ code/.editorconfig | 23 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 code/.clang-format create mode 100644 code/.editorconfig diff --git a/code/.clang-format b/code/.clang-format new file mode 100644 index 000000000..90f4ab553 --- /dev/null +++ b/code/.clang-format @@ -0,0 +1,24 @@ +--- +BasedOnStyle: WebKit +AllowShortFunctionsOnASingleLine: All +BraceWrapping: + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + IndentBraces: false +BreakBeforeBraces: Custom +BreakConstructorInitializersBeforeComma: 'false' +NamespaceIndentation: None +PointerAlignment: Right +SortIncludes: 'false' +TabWidth: '4' +UseTab: ForIndentation + +... diff --git a/code/.editorconfig b/code/.editorconfig new file mode 100644 index 000000000..e4aef2c53 --- /dev/null +++ b/code/.editorconfig @@ -0,0 +1,23 @@ +; Top-most EditorConfig file +root = true + +; 4-column tab indentation +[*.cpp] +indent_style = tab +indent_size = 4 + +[*.c] +indent_style = tab +indent_size = 4 + +[*.h] +indent_style = tab +indent_size = 4 + +[*.py] +indent_style = tab +indent_size = 4 + +[*.config] +indent_style = space +indent_size = 2