-
Notifications
You must be signed in to change notification settings - Fork 5
/
.clang-format
140 lines (118 loc) · 2.99 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# Clang-Format Configuration
---
BasedOnStyle: LLVM
# Indent
ConstructorInitializerIndentWidth: 2
ContinuationIndentWidth: 2
IndentPPDirectives: None
IndentRequiresClause: true
LambdaBodyIndentation: Signature
# Alignment
AlignAfterOpenBracket: AlwaysBreak
AlignEscapedNewlines: Left
AlignOperands: DontAlign
PointerAlignment: Left
# Breaks
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: Empty
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BraceWrapping:
AfterControlStatement: MultiLine
AfterFunction: true
BeforeCatch: true
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBraces: Custom
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
PackConstructorInitializers: NextLine
RequiresClausePosition: OwnLine
# Spaces
Cpp11BracedListStyle: false
SpacesInContainerLiterals: false
# Columns
ColumnLimit: 100
PenaltyBreakComment: 100
PenaltyBreakFirstLessLess: 100
PenaltyBreakString: 1000
PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 10000
# Comments
ReflowComments: false
SpacesBeforeTrailingComments: 2
CommentPragmas: '^ (NOTE|TODO):'
# Sorting
SortUsingDeclarations: false
# Line Endings
DeriveLineEnding: false
UseCRLF: false
---
Language: Cpp
Standard: c++20
# Includes
SortIncludes: CaseInsensitive
IncludeCategories:
# Relative Paths
- Regex: '^"'
Priority: 1
# Project Headers
- Regex: '^<horus/'
Priority: 2
SortPriority: 0
# Windows Core Headers
- Regex: '^<(ntifs|windows)\.h>'
Priority: 6
# Windows Driver Headers
- Regex: '^<(ntddk|ntddkbd|ntddmou|ntstatus|wdm)\.h>'
Priority: 7
# DirectX Headers
- Regex: '^<(d2d.*|d3d.*|dxgi.*|dwrite.*|dinput.*|dcomp)\.h>'
Priority: 8
# Windows Runtime Headers
- Regex: '^<wrl/'
Priority: 9
# Windows Headers
- Regex: '^<(wdf|commctrl|shellapi|tlhelp32|winioctl|winternl|winsock2|ws2tcpip|mswsock|unknwn)\.h>'
Priority: 10
# Benchmark Headers
- Regex: '^<benchmark/'
Priority: 3
SortPriority: 0
# Test Framework Headers
- Regex: '^<(gtest|gmock|doctest)/'
Priority: 4
SortPriority: 0
# Library Headers
- Regex: '^<.*\.'
Priority: 5
# C Compatibility Headers
- Regex: '^<c(a|c|e|f|i|l|m|s|t|u|w)'
Priority: 12
# C++ Standard Library Headers
- Regex: '^<'
Priority: 11
# Sources: a.hpp is main include for a.cpp, a_test.cpp, etc.
IncludeIsMainRegex: '(_test|_win32|_posix)?$'
# Headers: a.hpp, a_base.hpp, etc. are main includes for a.cpp
IncludeIsMainSourceRegex: '(_base|_impl)?$'
---
Language: ObjC
DisableFormat: true
---
Language: Java
BreakAfterJavaFieldAnnotations: true
---
Language: JavaScript
JavaScriptQuotes: Single
...