From 2b1e7a49d2adc2aa7e3b0776e1f137997ae27db7 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 28 Jun 2024 16:21:58 +0100 Subject: [PATCH] Added a clang-format file to the root Copy of my personal Dotfiles but this helps in case anyone else wants to contribute. --- .clang-format | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..20c4e46 --- /dev/null +++ b/.clang-format @@ -0,0 +1,30 @@ +# .clang-format -*- mode: yaml; lexical-binding: t; -*- +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: true +AlignConsecutiveBitFields: true +AlignConsecutiveMacros: true +AlignEscapedNewlines: true +AllowShortFunctionsOnASingleLine: false +AllowShortLambdasOnASingleLine: false +AllowShortLoopsOnASingleLine: false +AlwaysBreakTemplateDeclarations: Yes +BasedOnStyle: LLVM +BreakBeforeBraces: Custom +BraceWrapping: + AfterEnum: true + AfterStruct: true + AfterFunction: true + AfterNamespace: true + AfterClass: true + AfterUnion: true + AfterControlStatement: true + AfterExternBlock: true + BeforeLambdaBody: true + BeforeCatch: true + BeforeElse: true + SplitEmptyFunction: true + IndentBraces: false +ColumnLimit: 80 +IndentWidth: 2 +NamespaceIndentation: All