This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
/
config-schema.js
367 lines (360 loc) · 13.6 KB
/
config-schema.js
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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
/** @babel */
import path from 'path'
import fs from 'fs-plus'
// This is loaded by atom-environment.coffee. See
// https://atom.io/docs/api/latest/Config for more information about config
// schemas.
const configSchema = {
core: {
type: 'object',
properties: {
ignoredNames: {
type: 'array',
default: ['.git', '.hg', '.svn', '.DS_Store', '._*', 'Thumbs.db', 'desktop.ini'],
items: {
type: 'string'
},
description: 'List of [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29). Files and directories matching these patterns will be ignored by some packages, such as the fuzzy finder and tree view. Individual packages might have additional config settings for ignoring names.'
},
excludeVcsIgnoredPaths: {
type: 'boolean',
default: true,
title: 'Exclude VCS Ignored Paths',
description: 'Files and directories ignored by the current project\'s VCS system will be ignored by some packages, such as the fuzzy finder and find and replace. For example, projects using Git have these paths defined in the .gitignore file. Individual packages might have additional config settings for ignoring VCS ignored files and folders.'
},
followSymlinks: {
type: 'boolean',
default: true,
description: 'Follow symbolic links when searching files and when opening files with the fuzzy finder.'
},
disabledPackages: {
type: 'array',
default: [],
items: {
type: 'string'
},
description: 'List of names of installed packages which are not loaded at startup.'
},
customFileTypes: {
type: 'object',
default: {},
description: 'Associates scope names (e.g. `"source.js"`) with arrays of file extensions and file names (e.g. `["Somefile", ".js2"]`)',
additionalProperties: {
type: 'array',
items: {
type: 'string'
}
}
},
themes: {
type: 'array',
default: ['one-dark-ui', 'one-dark-syntax'],
items: {
type: 'string'
},
description: 'Names of UI and syntax themes which will be used when Atom starts.'
},
projectHome: {
type: 'string',
default: path.join(fs.getHomeDirectory(), 'github'),
description: 'The directory where projects are assumed to be located. Packages created using the Package Generator will be stored here by default.'
},
audioBeep: {
type: 'boolean',
default: true,
description: 'Trigger the system\'s beep sound when certain actions cannot be executed or there are no results.'
},
destroyEmptyPanes: {
type: 'boolean',
default: true,
title: 'Remove Empty Panes',
description: 'When the last tab of a pane is closed, remove that pane as well.'
},
closeEmptyWindows: {
type: 'boolean',
default: true,
description: 'When a window with no open tabs or panes is given the \'Close Tab\' command, close that window.'
},
fileEncoding: {
description: 'Default character set encoding to use when reading and writing files.',
type: 'string',
default: 'utf8',
enum: [
'cp437',
'cp850',
'cp866',
'eucjp',
'euckr',
'gbk',
'iso88591',
'iso885910',
'iso885913',
'iso885914',
'iso885915',
'iso885916',
'iso88592',
'iso88593',
'iso88594',
'iso88595',
'iso88596',
'iso88597',
'iso88597',
'iso88598',
'koi8r',
'koi8u',
'macroman',
'shiftjis',
'utf16be',
'utf16le',
'utf8',
'windows1250',
'windows1251',
'windows1252',
'windows1253',
'windows1254',
'windows1255',
'windows1256',
'windows1257',
'windows1258'
]
},
openEmptyEditorOnStart: {
description: 'When checked opens an untitled editor when loading a blank environment (such as with _File > New Window_ or when "Restore Previous Windows On Start" is unchecked); otherwise no editor is opened when loading a blank environment. This setting has no effect when restoring a previous state.',
type: 'boolean',
default: true
},
restorePreviousWindowsOnStart: {
description: 'When checked restores the last state of all Atom windows when started from the icon or `atom` by itself from the command line; otherwise a blank environment is loaded.',
type: 'boolean',
default: true
},
reopenProjectMenuCount: {
description: 'How many recent projects to show in the Reopen Project menu.',
type: 'integer',
default: 15
},
automaticallyUpdate: {
description: 'Automatically update Atom when a new release is available.',
type: 'boolean',
default: true
},
allowPendingPaneItems: {
description: 'Allow items to be previewed without adding them to a pane permanently, such as when single clicking files in the tree view.',
type: 'boolean',
default: true
},
telemetryConsent: {
description: 'Allow usage statistics and exception reports to be sent to the Atom team to help improve the product.',
title: 'Send Telemetry to the Atom Team',
type: 'string',
default: 'undecided',
enum: [
{
value: 'limited',
description: 'Allow limited anonymous usage stats, exception and crash reporting'
},
{
value: 'no',
description: 'Do not send any telemetry data'
},
{
value: 'undecided',
description: 'Undecided (Atom will ask again next time it is launched)'
}
]
},
warnOnLargeFileLimit: {
description: 'Warn before opening files larger than this number of megabytes.',
type: 'number',
default: 20
}
}
},
editor: {
type: 'object',
// These settings are used in scoped fashion only. No defaults.
properties: {
commentStart: {
type: ['string', 'null']
},
commentEnd: {
type: ['string', 'null']
},
increaseIndentPattern: {
type: ['string', 'null']
},
decreaseIndentPattern: {
type: ['string', 'null']
},
foldEndPattern: {
type: ['string', 'null']
},
// These can be used as globals or scoped, thus defaults.
fontFamily: {
type: 'string',
default: '',
description: 'The name of the font family used for editor text.'
},
fontSize: {
type: 'integer',
default: 14,
minimum: 1,
maximum: 100,
description: 'Height in pixels of editor text.'
},
lineHeight: {
type: ['string', 'number'],
default: 1.5,
description: 'Height of editor lines, as a multiplier of font size.'
},
showInvisibles: {
type: 'boolean',
default: false,
description: 'Render placeholders for invisible characters, such as tabs, spaces and newlines.'
},
showIndentGuide: {
type: 'boolean',
default: false,
description: 'Show indentation indicators in the editor.'
},
showLineNumbers: {
type: 'boolean',
default: true,
description: 'Show line numbers in the editor\'s gutter.'
},
atomicSoftTabs: {
type: 'boolean',
default: true,
description: 'Skip over tab-length runs of leading whitespace when moving the cursor.'
},
autoIndent: {
type: 'boolean',
default: true,
description: 'Automatically indent the cursor when inserting a newline.'
},
autoIndentOnPaste: {
type: 'boolean',
default: true,
description: 'Automatically indent pasted text based on the indentation of the previous line.'
},
nonWordCharacters: {
type: 'string',
default: "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-…",
description: 'A string of non-word characters to define word boundaries.'
},
preferredLineLength: {
type: 'integer',
default: 80,
minimum: 1,
description: 'Identifies the length of a line which is used when wrapping text with the `Soft Wrap At Preferred Line Length` setting enabled, in number of characters.'
},
tabLength: {
type: 'integer',
default: 2,
minimum: 1,
description: 'Number of spaces used to represent a tab.'
},
softWrap: {
type: 'boolean',
default: false,
description: 'Wraps lines that exceed the width of the window. When `Soft Wrap At Preferred Line Length` is set, it will wrap to the number of characters defined by the `Preferred Line Length` setting.'
},
softTabs: {
type: 'boolean',
default: true,
description: 'If the `Tab Type` config setting is set to "auto" and autodetection of tab type from buffer content fails, then this config setting determines whether a soft tab or a hard tab will be inserted when the Tab key is pressed.'
},
tabType: {
type: 'string',
default: 'auto',
enum: ['auto', 'soft', 'hard'],
description: 'Determine character inserted when Tab key is pressed. Possible values: "auto", "soft" and "hard". When set to "soft" or "hard", soft tabs (spaces) or hard tabs (tab characters) are used. When set to "auto", the editor auto-detects the tab type based on the contents of the buffer (it uses the first leading whitespace on a non-comment line), or uses the value of the Soft Tabs config setting if auto-detection fails.'
},
softWrapAtPreferredLineLength: {
type: 'boolean',
default: false,
description: 'Instead of wrapping lines to the window\'s width, wrap lines to the number of characters defined by the `Preferred Line Length` setting. This will only take effect when the soft wrap config setting is enabled globally or for the current language. **Note:** If you want to hide the wrap guide (the vertical line) you can disable the `wrap-guide` package.'
},
softWrapHangingIndent: {
type: 'integer',
default: 0,
minimum: 0,
description: 'When soft wrap is enabled, defines length of additional indentation applied to wrapped lines, in number of characters.'
},
scrollSensitivity: {
type: 'integer',
default: 40,
minimum: 10,
maximum: 200,
description: 'Determines how fast the editor scrolls when using a mouse or trackpad.'
},
scrollPastEnd: {
type: 'boolean',
default: false,
description: 'Allow the editor to be scrolled past the end of the last line.'
},
undoGroupingInterval: {
type: 'integer',
default: 300,
minimum: 0,
description: 'Time interval in milliseconds within which text editing operations will be grouped together in the undo history.'
},
confirmCheckoutHeadRevision: {
type: 'boolean',
default: true,
title: 'Confirm Checkout HEAD Revision',
description: 'Show confirmation dialog when checking out the HEAD revision and discarding changes to current file since last commit.'
},
invisibles: {
type: 'object',
description: 'A hash of characters Atom will use to render whitespace characters. Keys are whitespace character types, values are rendered characters (use value false to turn off individual whitespace character types).',
properties: {
eol: {
type: ['boolean', 'string'],
default: '¬',
maximumLength: 1,
description: 'Character used to render newline characters (\\n) when the `Show Invisibles` setting is enabled. '
},
space: {
type: ['boolean', 'string'],
default: '·',
maximumLength: 1,
description: 'Character used to render leading and trailing space characters when the `Show Invisibles` setting is enabled.'
},
tab: {
type: ['boolean', 'string'],
default: '»',
maximumLength: 1,
description: 'Character used to render hard tab characters (\\t) when the `Show Invisibles` setting is enabled.'
},
cr: {
type: ['boolean', 'string'],
default: '¤',
maximumLength: 1,
description: 'Character used to render carriage return characters (for Microsoft-style line endings) when the `Show Invisibles` setting is enabled.'
}
}
},
zoomFontWhenCtrlScrolling: {
type: 'boolean',
default: process.platform !== 'darwin',
description: 'Change the editor font size when pressing the Ctrl key and scrolling the mouse up/down.'
}
}
}
}
if (['win32', 'linux'].includes(process.platform)) {
configSchema.core.properties.autoHideMenuBar = {
type: 'boolean',
default: false,
description: 'Automatically hide the menu bar and toggle it by pressing Alt. This is only supported on Windows & Linux.'
}
}
if (process.platform === 'darwin') {
configSchema.core.properties.useCustomTitleBar = {
type: 'boolean',
default: false,
description: 'Use custom, theme-aware title bar.<br>Note: This currently does not include a proxy icon.<br>This setting will require a relaunch of Atom to take effect.'
}
}
export default configSchema