-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclang-format
92 lines (71 loc) · 1.99 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
# -*- mode: yaml;-*-
---
# Global defaults for all C-like languages
IndentWidth: 4
TabWidth: 4
UseTab: Never
ColumnLimit: 80
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakStringLiterals: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
# Same convention as in Python
SpacesBeforeTrailingComments: 2
# Don't inject spaces around my punctuation unless I say so!
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceAfterCStyleCast: false
SortUsingDeclarations: true
SortIncludes: true
IncludeBlocks: Preserve
# I prefer to do this manually with Emacs
ReflowComments: false
---
Language: Cpp
Standard: Cpp11
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
PointerAlignment: Right
FixNamespaceComments: true
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
AlwaysBreakTemplateDeclarations: Yes
AccessModifierOffset: -4
# TODO: not certain what my preference is
SpaceBeforeCpp11BracedList: true
SpaceAfterTemplateKeyword: false
AlignEscapedNewlines: Right
---
Language: JavaScript
ColumnLimit: 100
JavaScriptQuotes: Single
JavaScriptWrapImports: true
---
Language: Java
ColumnLimit: 100
BreakAfterJavaFieldAnnotations: true
...