-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.clang-format
49 lines (48 loc) · 1.28 KB
/
.clang-format
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
Language: Cpp
BasedOnStyle: LLVM
AlignEscapedNewlines: DontAlign
AlignTrailingComments: Never
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterDefinitionReturnType: All
BraceWrapping:
# It doesn't force line break unfortunately, because of an incompatibility with
# ColumnLimit == 0 (and ColumnLimit != 0 is too restrictive in my opinion), but
# at least it preserves it.
# See https://github.com/llvm/llvm-project/issues/44857#issuecomment-2088310102
AfterControlStatement: MultiLine
AfterEnum: true
AfterFunction: true
AfterStruct: true
AfterUnion: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Custom
ColumnLimit: 0
Cpp11BracedListStyle: false
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '"config\.h"'
Priority: -3
CaseSensitive: true
- Regex: '<.*>'
Priority: -2
CaseSensitive: true
- Regex: '".*/.*"'
Priority: -1
CaseSensitive: true
- Regex: '"[^/]*"'
Priority: 0
SortPriority: 1
CaseSensitive: true
IndentCaseLabels: true
IndentWidth: 4
InsertBraces: true
InsertNewlineAtEOF: true
MaxEmptyLinesToKeep: 2
WhitespaceSensitiveMacros:
# Avoid breaking formatting in the code parameter
- G_DEFINE_TYPE_WITH_CODE
...