-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy path.clang-format
More file actions
67 lines (56 loc) · 1.78 KB
/
Copy path.clang-format
File metadata and controls
67 lines (56 loc) · 1.78 KB
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
# options: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 120
# does (int) x instead of (int)x
SpaceAfterCStyleCast: true
# spaces, not tabs!
UseTab: Never
# if (x) doStuff() is not allowed, bad style
AllowShortIfStatementsOnASingleLine: false
AlignTrailingComments: true
SpacesBeforeTrailingComments: 3
AlignConsecutiveMacros: Consecutive
# use \n instead of \r\n
UseCRLF: false
AccessModifierOffset: -4
EmptyLineBeforeAccessModifier: Always
EmptyLineAfterAccessModifier: Never
NamespaceIndentation: None
BreakConstructorInitializers: BeforeComma
# we have some problems with ranges-v3 and AUI's AUI_LET, so keep it disabled
SortIncludes: Never
################################################# UI BUILDING ##########################################################
# use shorter indentation for UI building stuff (like in Dart/Flutter)
BracedInitializerIndentWidth: 2
ConstructorInitializerIndentWidth: 2
# better spacing around AUI_OVERRIDE_STYLE and AUI_LET.
# before:
# view AUI_OVERRIDE_STYLE{Expanding()},
# view AUI_LET{printf("Hello");},
#
# after:
# view AUI_OVERRIDE_STYLE { Expanding() },
# view AUI_LET { printf("Hello"); },
Cpp11BracedListStyle: false
SpaceBeforeCpp11BracedList: true
# forces nested initializer lists to begin with their own lines.
# note: you should use comma after last element in initializer lists.
# before:
# Centered { Horizontal {
#
# after:
# Centered {
# Horizontal {
PenaltyIndentedWhitespace: 1000
BreakBeforeBraces: Attach
BreakBeforeBinaryOperators: None
StatementAttributeLikeMacros:
- emit
# fix AUI's scary macros.
Macros:
- AUI_LET=+[]
- AUI_THREADPOOL=[]
- AUI_DECLARATIVE_FOR(a,b,c)=[v2=b,v3=c](a)
- AUI_DECLARATIVE_FOR_EX(a,b,c,d)=[d,v2=b,v3=c](a)
- AUI_OVERRIDE_STYLE=+std::vector