-
Notifications
You must be signed in to change notification settings - Fork 5
/
.editorconfig
328 lines (282 loc) · 7.97 KB
/
.editorconfig
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# <https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019>
# <https://docs.microsoft.com/en-us/visualstudio/ide/cpp-editorconfig-properties?view=vs-2019>
#### Core EditorConfig Options ####
charset = utf-8
# # Indentation and spacing
# indent_size = 4
# indent_style = space
# tab_width = 4
# # New line preferences
# end_of_line = crlf
# insert_final_newline = false
################################################################################
#### Config-like files ####
[*.{ae,cfg,ol,ptl}]
indent_style = tab
indent_size = 4
tab_width = 4
# CRLF is required by Cafeteria, but not required by LegoRR
end_of_line = crlf
# Trailing whitespace is expected by LegoRR Config_Load, otherwise there will be no null terminator.
# <--
# [EOF]
insert_final_newline = true
#### Cafeteria mod script ####
[script.txt]
indent_size = 4
indent_style = tab
tab_width = 4
# CRLF is required by Cafeteria
end_of_line = crlf
################################################################################
#### C/C++ files ####
[*.{h,hpp,c,cpp,rc,hint}]
# Indent preferences
indent_style = tab
indent_size = 4
tab_width = 4
# New line preferences
end_of_line = crlf
# <--
# [EOF]
insert_final_newline = true
########################################
#### Indentation settings ####
# { <--
# //...code...
# } <--
cpp_indent_braces = false
# void foo(void)
# {
# {
# --> //...code...
# }
# }
cpp_indent_multi_line_relative_to = innermost_parenthesis
# UNSURE: Both of these have a lot of drawbacks... (align_to_parenthesis|indent)
# foobarbaz(uint32 a, uint32 b, uint32 c,
# --> bool32 on, bool32 toggle);
cpp_indent_within_parentheses = align_to_parenthesis
# switch (value) {
# case 0: <--
# break;
# }
cpp_indent_case_labels = false
# case 1:
# --> //...code...
# --> break;
cpp_indent_case_contents = true
# case 2: {
# --> //...code...
# --> }
# break;
cpp_indent_case_contents_when_block = true
# UNKNOWN:
# foo(x, y,
# real32 [](real32 x, real32 y) {
# real32 z = 0.0f;
# Map3D_GetSurfaceZ(x, y, &z);
# return z;
# }, <--
# true);
cpp_indent_lambda_braces_when_parameter = false
# void foo(bool32 bar)
# {
# if (bar) {
# --> MYLABEL:
# //...code...
# }
cpp_indent_goto_labels = one_left
# UNSURE: (one_left|leftmost_column)
## void foo(bool32 bar)
## {
## if (bar) {
## --> #if MYCONDITION
## //...code...
## #endif
## }
#cpp_indent_preprocessor = one_left
# void foo(bool32 bar)
# {
# if (bar) {
# #if MYCONDITION <--
# //...code...
# #endif <--
# }
cpp_indent_preprocessor = leftmost_column
# UNKNOWN: ??? (true|false)
cpp_indent_access_specifiers = false
# Include file namespaces get weird otherwise... (true|false)
cpp_indent_namespace_contents = false
# This will mess up Gods98 comments that start at the very beginning of the line
# Make sure to rework these so that it's clear what was commented out in the source,
# vs. what was commented out in OpenLRR.
cpp_indent_preserve_comments = false
########################################
#### Newline settings ####
# namespace OpenLRR
# { <--
cpp_new_line_before_open_brace_namespace = new_line
# struct Point2F
# { <--
cpp_new_line_before_open_brace_type = new_line
# void foo(void)
# { <--
cpp_new_line_before_open_brace_function = new_line
# CHANGED:
## if (condition) { <--
## //...code...
## }
#cpp_new_line_before_open_brace_block = same_line
# Let the user handle this themselves.
# A new line is recommended when a block condition spans multiple lines.
# But otherwise, a newline is excessive over the same line.
cpp_new_line_before_open_brace_block = ignore
# V
# auto func = [](sint32 x, sint32 y) { <--
# return x * y * 4;
# }
cpp_new_line_before_open_brace_lambda = same_line #? (new_line|same_line|ignore)
# UNKNOWN: ??? (true|false)
cpp_new_line_scope_braces_on_separate_lines = true
# This shouldn't even exist... right?
# struct Dummy
# {
# }; <--
cpp_new_line_close_brace_same_line_empty_type = false
# void foo(void)
# {
# } <--
cpp_new_line_close_brace_same_line_empty_function = false
# try {
# //...code...
# }
# catch {
# //...code...
# }
cpp_new_line_before_catch = true
# if (condition) {
# //...code...
# }
# else <--
cpp_new_line_before_else = true
# do {
# //...code...
# } while (condition); <--
cpp_new_line_before_while_in_do_while = false
########################################
#### Spacing settings ####
# v
# foo()
cpp_space_before_function_open_parenthesis = remove
# v v
# foo(a, b, c)
cpp_space_within_parameter_list_parentheses = false
# v
# foo()
cpp_space_between_empty_parameter_list_parentheses = false
# V
# if (condition) {
cpp_space_after_keywords_in_control_flow_statements = true
# v v
# if (condition)
cpp_space_within_control_flow_statement_parentheses = false
# v v
# auto func = [](sint32 b) { return b*4; }
cpp_space_before_lambda_open_parenthesis = false
# v v
# uint8 myByte = (uint8)myVar;
cpp_space_within_cast_parentheses = false
# v
# uint8 myByte = (uint8)myVar;
cpp_space_after_cast_close_parenthesis = false
# IGNORE: Let the user decide what looks the cleanest and easiest to read.
#cpp_space_within_expression_parentheses = ? (true|false)
# V
# if (condition) {
cpp_space_before_block_open_brace = true
# v
# if (condition) {}
cpp_space_between_empty_braces = false
# V
# new MyClass {param1, param2};
cpp_space_before_initializer_list_open_brace = true
# V V
# new MyClass{ param1, param2 };
cpp_space_within_initializer_list_braces = true
# ~~~
# new MyClass{ param1, param2,
# myparam3, param4 };
cpp_space_preserve_in_initializer_list = true
# v
# myArray[203]
cpp_space_before_open_square_bracket = false
# v v
# myArray[203]
cpp_space_within_square_brackets = false
# v
# char myArray[];
cpp_space_before_empty_square_brackets = false
# v
# char myArray[];
cpp_space_between_empty_square_brackets = false
# UNKNOWN: ???
cpp_space_group_square_brackets = true
# v v
# auto func = [capture1, capture2](sint32 a) { return a + (capture1 * capture2); }
cpp_space_within_lambda_brackets = false
# v
# auto func = [](sint32 b) { return b*4; }
cpp_space_between_empty_lambda_brackets = false
# v
# foo(a, b, c);
cpp_space_before_comma = false
# V
# foo(a, b, c);
cpp_space_after_comma = true
# IGNORE: Let the user decide what looks the cleanest and easiest to read.
#cpp_space_remove_around_member_operators = ? (true|false)
# V
# class Derived : Base
cpp_space_before_inheritance_colon = true
# V
# MyClass(sint32 a, sint32 b) : m_a(a), m_b(b)
cpp_space_before_constructor_colon = true
# v
# uint32 value = 0;
cpp_space_remove_before_semicolon = true
# For for loops, right?.... RIGHT?
# V V
# for (uint32 i = 0; i < 10; i++) {
cpp_space_after_semicolon = true
# v
# value = -a;
cpp_space_remove_around_unary_operator = true
# CHANGED:
## V V
## value = a + b;
#cpp_space_around_binary_operator = insert
# ~ ~
# value = a + b; ~
# value = array[loop-1];
cpp_space_around_binary_operator = ignore
# CHANGED:
## V V
## value = 0;
#cpp_space_around_assignment_operator = insert
# ~~~~~ ~
# value = 0;
cpp_space_around_assignment_operator = ignore
# v
# char* str;
cpp_space_pointer_reference_alignment = left
# V V V V
# value = ((c > 0) ? newValue : 0)
cpp_space_around_ternary_operator = insert
########################################
#### Wrapping options ####
# UNKNOWN: ??? (one_liners|all_one_line_scopes|never)
cpp_wrap_preserve_blocks = one_liners
################################################################################