-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-format
113 lines (103 loc) · 3.2 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
Language: Cpp
# list of all options:
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
Standard: c++17
AccessModifierOffset: -4
TabWidth: 4
IndentWidth: 4
ConstructorInitializerIndentWidth: 4
UseTab: Never
# jnl this may be shortened, but this will effect a lot of the formatting
ColumnLimit: 120
#jnl maybe even 0
SpacesBeforeTrailingComments: 1
# jnl again, not sure what this does
ContinuationIndentWidth: 0
# jnl maybe think about this, im not sure
# should be the same
BinPackArguments: false
BinPackParameters: false
# jnl maybe think about this, im not sure
AlwaysBreakAfterReturnType: None
#https://stackoverflow.com/questions/32970045/how-to-prevent-clang-format-to-add-space-after-comment-char
CommentPragmas: '^[^ ]'
#https://stackoverflow.com/questions/39858266/using-clang-format-keep-empty-braces-on-the-same-line
BreakBeforeBraces: Allman
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterFunction: true
AfterNamespace: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
BeforeCatch: false
BeforeElse: true
# BeforeLambdaBody: true
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Always
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
#AlwaysBreakAfterDefinitionReturnType
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
BreakStringLiterals: true
CompactNamespaces: true
ConstructorInitializerAllOnOneLineOrOnePerLine: false
Cpp11BracedListStyle: false
DeriveLineEnding: false
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
IncludeBlocks: Preserve
#hmm, this doesnt work for me: IndentCaseBlocks: false
IndentCaseLabels: false
IndentPPDirectives: BeforeHash
IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: false
MaxEmptyLinesToKeep: 2
NamespaceIndentation: All
PointerAlignment: Left #jnl i'll fight you over this
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeParens: Never
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: true
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
#hmm, this doesnt work for me: SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
UseCRLF: false