-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
46 lines (45 loc) · 1.09 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
---
Language: Cpp
BasedOnStyle: LLVM
IndentWidth: 4
UseTab: Never
# 指针对齐
PointerAlignment: Left
# 访问限定符偏移
AccessModifierOffset: -4
# 不使用 \r\n
UseCRLF: false
# 参数对齐
AlignAfterOpenBracket: Align
# 数组初始化对齐(左对齐)
AlignArrayOfStructures: Left
# 宏对齐
AlignConsecutiveMacros: AcrossEmptyLines
# 多行转义对齐(靠左)
AlignEscapedNewlines: Left
# 多行操作符对齐(与等号对齐)
AlignOperands: AlignAfterOperator
# 尾随注释对齐
AlignTrailingComments: Always
# 大括号包装
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
# concept 换行
BreakBeforeConceptDeclarations: Always
# 内联汇编冒号换行
BreakBeforeInlineASMColon: Always
# 三元运算符换行
BreakBeforeTernaryOperators: true
# 初始化器换行格式
BreakConstructorInitializers: BeforeComma
# 自动添加命名控件注释
FixNamespaceComments: true
# 模板声明始终换行 (>=clang19)
# BreakTemplateDeclarations: Yes