summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format46
1 files changed, 46 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..49ef4ad
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,46 @@
+---
+Language: C
+BasedOnStyle: LLVM
+
+InsertNewlineAtEOF: true
+
+IndentWidth: 2
+TabWidth: 2
+UseTab: Never
+IndentCaseLabels: true
+
+SpaceBeforeParens: ControlStatements
+SpacesInParentheses: false
+SpacesInCStyleCastParentheses: false
+SpaceAfterCStyleCast: false
+BreakBeforeBraces: Attach
+
+ColumnLimit: 80
+AllowShortFunctionsOnASingleLine: None
+AllowShortBlocksOnASingleLine: false
+AllowShortIfStatementsOnASingleLine: false
+AllowShortLoopsOnASingleLine: false
+BinPackParameters: false
+BinPackArguments: false
+
+PointerAlignment: Right
+
+AlignEscapedNewlines: Right
+IndentPPDirectives: AfterHash
+
+SortIncludes: true
+IncludeBlocks: Merge
+IncludeCategories:
+ - Regex: '^<chafa/.*'
+ Priority: 1
+ - Regex: '^<glib*'
+ Priority: 2
+ - Regex: '^<sys/.*'
+ Priority: 3
+ - Regex: '^<.*\.h>'
+ Priority: 4
+ - Regex: '^".*"'
+ Priority: 5
+ - Regex: '.*'
+ Priority: 6
+...