-
Notifications
You must be signed in to change notification settings - Fork 6
/
_clang-format
70 lines (58 loc) · 1.69 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
# Using clang format 8.0
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Becuase you have to start somewhere.
BasedOnStyle: LLVM
# Basic settings
ColumnLimit: 0
ContinuationIndentWidth: 4
IndentWidth: 4
UseTab: Never
Language: Cpp
Standard: Cpp11
# Code layout
AlignAfterOpenBracket: Align
AlignTrailingComments: true
SpacesBeforeTrailingComments: 2
BreakBeforeBraces: Custom
BraceWrapping:
AfterNamespace: false
AfterCaseLabel: true
AfterClass: true
AfterStruct: true
AfterUnion: true
AfterEnum: true
AfterFunction: true
AfterControlStatement: true
BeforeCatch: true
BeforeElse: true
PointerAlignment: Middle
IndentCaseLabels: true
MaxEmptyLinesToKeep: 2
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
CompactNamespaces: false
SpaceAfterTemplateKeyword: false
SpaceAfterCStyleCast: false
SpaceBeforeAssignmentOperators: true
SpacesInAngles: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesInContainerLiterals: true
SpacesInSquareBrackets: false
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: true
AlignEscapedNewlines: DontAlign
AlignOperands: true
AccessModifierOffset: -4
AllowShortCaseLabelsOnASingleLine: false
FixNamespaceComments: true
IndentPPDirectives: AfterHash
# Don't let clang-format touch the order of includes. This breaks shit.
SortIncludes: false
BinPackArguments: false
BinPackParameters: false
AllowAllParametersOfDeclarationOnNextLine: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon