-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
57 lines (46 loc) · 1.34 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
50
51
52
53
54
55
56
57
# 语言: None, Cpp, Java, JavaScript, ObjC, Proto, TableGen, TextProto
Language: Cpp
BasedOnStyle: LLVM
# 访问说明符(public、private等)的偏移
AccessModifierOffset: -3
# 开括号(开圆括号、开尖括号、开方括号)后的对齐: Align, DontAlign, AlwaysBreak(总是在开括号后换行)
AlignAfterOpenBracket: Align
# 对齐数组列
AlignArrayOfStructures: None
AlignOperands: Align
BreakBeforeBinaryOperators: None
PackConstructorInitializers: NextLine
ColumnLimit: 0
# 缩进宽度
IndentWidth: 4
# 在大括号前换行
BreakBeforeBraces: Custom
# 大括号换行,只有当BreakBeforeBraces设置为Custom时才有效,设置其他配置则下面不生效
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: true
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: true
AfterExternBlock: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: true
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakInheritanceList: BeforeColon
BreakConstructorInitializers: BeforeColon
BreakBeforeTernaryOperators: true
# 连续空行的最大数量
MaxEmptyLinesToKeep: 4
# 命名空间的缩进
NamespaceIndentation: All
# 标准
Standard: c++20