Skip to content

Commit a8cec74

Browse files
committed
add options
1 parent df7833e commit a8cec74

File tree

1 file changed

+52
-2
lines changed

1 file changed

+52
-2
lines changed

.clang-format

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,53 @@
11
BasedOnStyle: LLVM
2-
DerivePointerAlignment: false
3-
PointerAlignment: Left
2+
# If true, clang-format will attempt to re-flow comments
3+
ReflowComments: false
4+
# The column limit.
5+
ColumnLimit: 100
6+
# Indent width for line continuations.
7+
ContinuationIndentWidth: 4
8+
# The number of columns to use for indentation.
9+
IndentWidth: 8
10+
# The number of columns used for tab stops.
11+
TabWidth: 8
12+
UseTab: ForIndentation
13+
14+
# Options for aligning backslashes in escaped newlines.
15+
AlignEscapedNewlines: Left
16+
# Short Block Style
17+
AllowShortBlocksOnASingleLine: true
18+
# If true, short case labels will be contracted to a single line.
19+
AllowShortCaseLabelsOnASingleLine: true
20+
# Dependent on the value, int f() { return 0; } can be put on a single line.
21+
AllowShortFunctionsOnASingleLine: Empty
22+
# The brace breaking style to use.
23+
BreakBeforeBraces: Custom
24+
# Control of individual brace wrapping cases.
25+
BraceWrapping:
26+
# Wrap class definition.
27+
AfterClass: true
28+
# Wrap control statements
29+
AfterControlStatement: true
30+
# Wrap enum definitions.
31+
AfterEnum: true
32+
# Wrap function definitions.
33+
AfterFunction: true
34+
# Wrap namespace definitions.
35+
AfterNamespace: true
36+
# Wrap struct definitions.
37+
AfterStruct: true
38+
# Wrap union definitions.
39+
AfterUnion: true
40+
# Wrap extern blocks.
41+
AfterExternBlock: false
42+
# Wrap before catch.
43+
BeforeCatch: true
44+
# Wrap before else.
45+
BeforeElse: true
46+
# Indent the wrapped braces themselves.
47+
IndentBraces: false
48+
# If false, empty function body can be put on a single line.
49+
SplitEmptyFunction: false
50+
# If false, empty record (e.g. class, struct or union) body can be put on a single line.
51+
SplitEmptyRecord: false
52+
# If false, empty namespace body can be put on a single line.
53+
SplitEmptyNamespace: false

0 commit comments

Comments
 (0)