-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-format
59 lines (47 loc) · 1.45 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
Language: Cpp
Standard: Cpp11
ColumnLimit: 160
TabWidth: 2
IndentWidth: 2
UseTab: Never
# spaces settings
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeParens: ControlStatements # after if, while, for, but not function calls
#BreakConstructorInitializers: BeforeComma
# break before {, all the god damn time
BreakBeforeBraces: Custom
BraceWrapping:
AfterClass: true
AfterStruct: true
AfterUnion: true
AfterControlStatement: true
BeforeElse: true
AfterEnum: true
AfterFunction: true
AfterNamespace: true
BeforeCatch: true
IndentBraces: false
# single line settings
AllowShortFunctionsOnASingleLine: Inline
#AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
# Misc indentation settings
IndentCaseLabels: true
NamespaceIndentation: All
AlwaysBreakTemplateDeclarations: true
# use one line per param in huge function calls / definitions
BinPackArguments: false
BinPackParameters: false
# misc alignment settings
AlignAfterOpenBracket: Align
DerivePointerAlignment: false
PointerAlignment: Left
# WISHLIST: for all the below, and "allow" option, instead of just true or false
# This would preserve alignment if it's already aligned, but not force it if it
# wasn't. Without that option, the amount of false positives make these useless
#AlignConsecutiveAssignments
#AlignConsecutiveDeclarations
#AlignEscapedNewlines
#AlignTrailingComments