-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.clang-format
99 lines (85 loc) · 2.42 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
# itsy.bitsy
#
# Copyright ⓒ 2019-present ThePhD.
#
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# See https://github.com/ThePhD/itsy_bitsy#using-the-library for documentation.
# clang-format style file
---
BasedOnStyle: LLVM
IndentWidth: 5
TabWidth: 5
ContinuationIndentWidth: 5
UseTab: ForIndentation
# Namespaces
NamespaceIndentation: All
CompactNamespaces: true
FixNamespaceComments: true
# Overall Alignment
# GNU says 80 but my eyes bleed a lot, so...
ColumnLimit: 120
AlignAfterOpenBracket: DontAlign # uses ContinuationIndentWidth for this instead
AccessModifierOffset: -5 # public should be aligned with opening braces
AlignConsecutiveAssignments: true # affects more than what's expected: do not use
#AlignConsecutiveDeclarations: true # affects more than what's expected: do not use
# Type Alignment
DerivePointerAlignment: false
PointerAlignment: Left
# Comments
AlignTrailingComments: true
ReflowComments: true
# Macros
AlignEscapedNewlines: Left
#IndentPPDirectives: None
# Functions
AllowShortFunctionsOnASingleLine: None
AlwaysBreakTemplateDeclarations: true
AlwaysBreakAfterReturnType: All
BreakConstructorInitializers: BeforeComma
ConstructorInitializerIndentWidth: 0
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BinPackArguments: true
BinPackParameters: true
# Classes
BreakBeforeInheritanceComma: false
# Braces
Cpp11BracedListStyle: false
BreakBeforeBraces: GNU
BraceWrapping:
IndentBraces: false
SplitEmptyFunction: false
AfterControlStatement: true
AfterNamespace: true
AfterEnum: true
AfterUnion: true
AfterFunction: true
AfterClass: true
AfterStruct: true
AfterExternBlock: true
BeforeCatch: true
# Control Statements
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
IndentCaseLabels: false
# Spaces
SpaceAfterCStyleCast: false
SpacesInCStyleCastParentheses: false
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
MaxEmptyLinesToKeep: 3
# OCD
AlwaysBreakBeforeMultilineStrings: true
SortUsingDeclarations: true
SortIncludes: false
---
Language: Cpp
Standard: Cpp11