-
Notifications
You must be signed in to change notification settings - Fork 2
/
.clang-format
55 lines (53 loc) · 1.43 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
# List of SHENNANIGAN
# 1. IndentAccessModifiers: true causes useless indentation in structs, but
# false makes access modifiers like public be on same line as member fields.
# 2. Unintuitive setup for cases like `enum Color { red, green, blue };` via
# config BasedOnStyle: WebKit instead of LLVM
# 3. default ColumnLimit: 80 instead of more sane 100 or 120
# clang-format < 16
# AlignTrailingComments: true/false
# clang-format >= 16
# AlignTrailingComments:
# Kind: Always
# OverEmptyLines: 0
# C and C++
---
AlignEscapedNewlines: Left
AlignTrailingComments: true
BasedOnStyle: LLVM
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterFunction: false
AfterEnum: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BreakBeforeBraces: Custom
BreakBeforeInheritanceComma: true
BreakConstructorInitializers: BeforeComma
ColumnLimit: 120
IndentAccessModifiers: false
IndentCaseLabels: true
IndentPPDirectives: None
IndentRequiresClause: false
IndentWidth: 2
InsertNewlineAtEOF: true
# clang clang-format 19
# KeepEmptyLines:
# AtEndOfFile: true
LineEnding: LF
NamespaceIndentation: None
QualifierAlignment: Right
ReflowComments: false
RemoveSemicolon: true
RequiresClausePosition: WithFollowing
RequiresExpressionIndentation: OuterScope
SpaceAfterTemplateKeyword: false
TabWidth: 2
UseTab: Never