forked from timonwong/SublimeAStyleFormatter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSublimeAStyleFormatter.sublime-settings
More file actions
308 lines (259 loc) · 14.8 KB
/
SublimeAStyleFormatter.sublime-settings
File metadata and controls
308 lines (259 loc) · 14.8 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
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
{
// NOTE: You should always edit options in user file, not this file.
// Print debug message
"debug": false,
// Auto format on file save
"autoformat_on_save": false,
// The mapping key is `syntax name`, and the value is `formatting mode`.
// Note that the value for each mapping should be "c", "java" or "cs".
"user_defined_syntax_mode_mapping": {
// For example:
/*
"arduino": "c",
"pde": "java",
"apex": "java"
*/
},
// Please visit http://astyle.sourceforge.net/astyle.html for more information
"options_default": {
// Default bracket style
// Can be either "allman", "ansi", "bsd", "break", "java", "attach", "kr", "k&r",
// "k/r" "stroustrup", "whitesmith", "banner", "gnu", "linux", "horstmann",
// "1tbs", "otbs ", "pico", "lisp", "python", or ""
"style": "ansi",
// Tab options
// Can be either "spaces", "tab" "force-tab" or "force-tab-x"
"indent": "spaces",
"indent-spaces": 4,
// === Indentation Options ===
// Indent 'class' and 'struct' blocks so that the blocks 'public:',
// 'protected:' and 'private:' are indented. The struct blocks are
// indented only if an access modifier is declared somewhere in the
// struct. The entire block is indented. This option is effective for C++ files only.
"indent-classes": false,
// Indent 'switch' blocks so that the 'case X:' statements are indented
// in the switch block. The entire case block is indented.
"indent-switches": false,
// Indent 'case X:' blocks from the 'case X:' headers. Case statements
// not enclosed in blocks are NOT indented.
"indent-cases": false,
// Add extra indentation to namespace blocks. This option has
// no effect on Java files.
"indent-namespaces": false,
// Add extra indentation to labels so they appear 1 indent less than the
// current indentation, rather than being flushed to the left (the default).
"indent-labels": false,
// Indent multi-line preprocessor definitions ending with a backslash.
// Should be used with `convert-tabs` for proper results. Does a pretty
// good job, but cannot perform miracles in obfuscated preprocessor
// definitions. Without this option the preprocessor statements remain unchanged.
"indent-preprocessor": true,
// Indent C++ comments beginning in column one. By default C++ comments
// beginning in column one are not indented. This option will allow the
// comments to be indented with the code.
"indent-col1-comments": true,
// Set the minimal indent that is added when a header is built of multiple
// lines. This indent helps to easily separate the header from the command
// statements that follow. The value for # indicates a number of indents
// and is a minimum value. The indent may be greater to align with the data
// on the previous line.
// The valid values are:
// 0 - no minimal indent. The lines will be aligned with the paren on the
// preceding line.
// 1 - indent at least one additional indent.
// 2 - indent at least two additional indents.
// 3 - indent at least one-half an additional indent. This is intended for
// large indents (e.g. 8).
// The default value is 2, two additional indents.
"min-conditional-indent": 2,
// Set the maximum spaces to indent a continuation line.
// The maximum spaces indicate a number of columns and
// must not be greater than 120. A maximum of less
// than two indent lengths will be ignored. This option
// will prevent continuation lines from extending too
// far to the right. Setting a larger value will allow
// the code to be extended further to the right.
//
// range: [40, 120]
"max-instatement-indent": 40,
// === Padding Options ===
// "" - Do nothing
// "default" - Pad empty lines around header blocks (e.g. 'if',
// 'for', 'while'...).
// "all" - Pad empty lines around header blocks (e.g. 'if',
// 'for', 'while'...). Treat closing header blocks
// (e.g. 'else', 'catch') as stand-alone blocks.
"break-blocks": "",
// Insert space padding around operators. Any end of line comments
// will remain in the original column, if possible. Note that there
// is no option to unpad. Once padded, they stay padded.
"pad-oper": true,
// Insert space padding around parenthesis on both the outside and
// the inside. Any end of line comments will remain in the original
// column, if possible.
"pad-paren": false,
// Insert space padding around parenthesis on the outside only. Any
// end of line comments will remain in the original column, if possible.
// This can be used with `unpad-paren` below to remove unwanted spaces.
"pad-paren-out": false,
// Insert space padding around the first parenthesis in a series on the
// outside only. Any end of line comments will remain in the original
// column, if possible. This can be used with unpad-paren below to remove
// unwanted spaces. If used with pad-paren or pad-paren-out, this
// option will be ignored. If used with pad-paren-in, the result will
// be the same as pad-paren.
"pad-first-paren-out": false,
// Insert space padding around parenthesis on the inside only. Any
// end of line comments will remain in the original column, if possible.
// This can be used with `unpad-paren` below to remove unwanted spaces.
"pad-paren-in": false,
// Insert space padding after paren headers only (e.g. 'if', 'for',
//'while'...). Any end of line comments will remain in the original
// column, if possible. This can be used with unpad-paren to remove
// unwanted spaces.
"pad-header": true,
// Remove extra space padding around parenthesis on the inside and outside.
// Any end of line comments will remain in the original column, if possible.
// This option can be used in combination with the paren padding options
// `pad-paren`, `pad-paren-out`, `pad-paren-in`, and `pad-header` above.
// Only padding that has not been requested by other options will be removed.
// For example, if a source has parens padded on both the inside and outside,
// and you want inside only. You need to use unpad-paren to remove the outside
// padding, and pad-paren-in to retain the inside padding. Using only `pad-paren-in`
// would not remove the outside padding.
"unpad-paren": false,
// Delete empty lines within a function or method. Empty lines outside of functions
// or methods are NOT deleted. If used with break-blocks or break-blocks=all it will
// delete all lines EXCEPT the lines added by the `break-blocks` options.
"delete-empty-lines": false,
// Fill empty lines with the white space of the previous line.
"fill-empty-lines": false,
// Attach a pointer or reference operator (* or &) to either the variable type (left)
// or variable name (right), or place it between the type and name (middle).
// The spacing between the type and name will be preserved, if possible. To format
// references separately use the following `align-reference` option.
// can be either "", "type", "middle" or "name"
"align-pointer": "name",
// This option will align references separate from pointers. Pointers are not changed
// by this option. If pointers and references are to be aligned the same, use the
// previous `align-pointer` option. The option align-reference=none will not change
// the reference alignment. The other options are the same as for `align-pointer`.
// In the case of a reference to a pointer (*&) with conflicting alignments, the
// `align-pointer` value will be used.
// can be either "none", "type", "middle", "name"
"align-reference": "name",
// === Formatting Options ===
// When `style` is "attach", "linux" or "stroustrup", this breaks closing headers
// (e.g. 'else', 'catch', ...) from their immediately preceding closing brackets.
// Closing header brackets are always broken with broken brackets, horstmann
// rackets, indented blocks, and indented brackets.
"break-closing-brackets": false,
// Break "else if" header combinations into separate lines. This option has no effect
// if keep-one-line-statements is used, the "else if" statements will remain as they are.
// If this option is NOT used, "else if" header combinations will be placed on a single line.
"break-elseifs": false,
// Add brackets to unbracketed one line conditional statements (e.g. 'if', 'for', 'while'...).
// The statement must be on a single line. The brackets will be added according to the
// currently requested predefined style or bracket type. If no style or bracket type is
// requested the brackets will be attached. If `add-one-line-brackets` is also used the
// result will be one line brackets.
"add-brackets": false,
// Add one line brackets to unbracketed one line conditional statements
// (e.g. 'if', 'for', 'while'...). The statement must be on a single line.
// The option implies `keep-one-line-blocks` and will not break the one line blocks.
"add-one-line-brackets": false,
// Don't break one-line blocks.
"keep-one-line-blocks": false,
// Don't break complex statements and multiple statements residing on a single line.
"keep-one-line-statements": true,
// Converts tabs into spaces in the non-indentation part of the line. The number of
// spaces inserted will maintain the spacing of the tab. The current setting for
// spaces per tab is used. It may not produce the expected results if `convert-tabs`
// is used when changing spaces per tab. Tabs are not replaced in quotes.
"convert-tabs": true,
// Closes whitespace in the angle brackets of template definitions. Closing
// the ending angle brackets is now allowed by the C++11 standard.
// Be sure your compiler supports this before making the changes.
"close-templates": false,
// The option max-code-length will break a line if the code exceeds # characters.
// The valid values are 50 thru 200. Lines without logical conditionals will
// break on a logical conditional (||, &&, ...), comma, paren, semicolon, or space.
//
// Some code will not be broken, such as comments, quotes, and arrays.
// If used with keep-one-line-blocks or add-one-line-brackets the blocks
// will NOT be broken. If used with keep-one-line-statements the statements
// will be broken at a semicolon if the line goes over the maximum length.
// If there is no available break point within the max code length, the
// line will be broken at the first available break point after the max code length.
//
// By default logical conditionals will be placed first on the new line.
// The option break-after-logical will cause the logical conditionals to be
// placed last on the previous line. This option has no effect without max-code-length.
"max-code-length": -1,
"break-after-logical": false,
// == Objective-C Options ==
// Because of the longer indents sometimes needed for Objective-C, the option
// "max-instatement-indent" may need to be increased. If you are not getting
// the paren and square bracket alignment you want, try increasing this value.
// Align the colons in Objective-C method declarations. This option is effective
// for Objective-C files only.
"align-method-colon": false,
// Insert space padding after the '-' or '+' Objective-C method prefix. This will
// add exactly one space. Any additional spaces will be deleted. This option is
// effective for Objective-C files only.
"pad-method-prefix": false,
// Remove all space padding after the '-' or '+' Objective-C method prefix.
// If used with pad-method-prefix, this option will be ignored. This option
// is effective for Objective-C files only.
"unpad-method-prefix": false,
// Add or remove space padding before or after the colons in an Objective-C
// method call. These options will pad exactly one space. Any additional
// spaces will be deleted. Colons immediarely preceeding a paren will not
// be padded. This option is effective for Objective-C files only.
//
// Can be either "none", "all", "after" or "before"
"pad-method-colon": "none"
},
//
// Language Specific Options
//
// You can override default options in language-specific options here.
// Addtional options are also provided:
//
// "additional_options": Addtional options following astyle options file style
// (http://astyle.sourceforge.net/astyle.html).
// e.g.: "additional_options": ["--indent=spaces=2", "--convert-tabs"]
//
// "additional_options_file": Addtional options file for astyle (aka astylerc), you must specify
// a full path for that file, environment variable may be included.
// e.g.: "additional_options_file": "%USERPROFILE%/astylerc" // (Windows)
// e.g.: "additional_options_file": "$HOME/.astylerc" // (Linux)
//
// "use_only_additional_options": While true, SublimeAStyleFormatter will *only* process
// options in *both* "additional_options" and "additional_options_file".
// Language-specific options for C
"options_c": {
"use_only_additional_options": false,
"additional_options_file": "",
"additional_options": []
},
// Language-specific for C++
"options_c++": {
"use_only_additional_options": false,
"additional_options_file": "",
"additional_options": []
},
// Language-specific for Java
"options_java": {
"style": "java",
"use_only_additional_options": false,
"additional_options_file": "",
"additional_options": []
},
// Language-specific for C#
"options_cs": {
"use_only_additional_options": false,
"additional_options_file": "",
"additional_options": []
}
}