aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.clang-format
diff options
context:
space:
mode:
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format31
1 files changed, 23 insertions, 8 deletions
diff --git a/.clang-format b/.clang-format
index 87ad91d..64a2caf 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,14 +1,29 @@
---
-# The "Linux kernel" style, borrowed and modified from
-# https://clang.llvm.org/docs/ClangFormatStyleOptions.html#examples
-BasedOnStyle: LLVM
+Language: Cpp
+BasedOnStyle: Chromium
+
IndentWidth: 8
UseTab: AlignWithSpaces
-BreakBeforeBraces: Linux
-AllowShortIfStatementsOnASingleLine: false
-IndentCaseLabels: false
-ColumnLimit: 100
-AlignConsecutiveMacros: Consecutive
+AccessModifierOffset: -4
+AlignConsecutiveMacros: AcrossComments
AllowShortFunctionsOnASingleLine: Empty
+BinPackArguments: false
+BreakConstructorInitializers: BeforeComma
+BreakInheritanceList: BeforeComma
BreakStringLiterals: false
+ColumnLimit: 100
+IncludeBlocks: Regroup
+SpacesBeforeTrailingComments: 1
+WrapNamespaceBodyWithEmptyLines: Always
+
+IncludeCategories:
+ - Regex: '^".+'
+ Priority: 1
+ - Regex: '^<git2\.h>|<json-c\/|<sodium\.h>|<sqlite3\.h>'
+ Priority: 2
+ - Regex: '^<.*\.h>$'
+ Priority: 3
+ - Regex: '.*'
+ Priority: 4
+...