Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/src/vs/workbench/electron-browser/desktop.contribution.ts
3291 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import { Registry } from '../../platform/registry/common/platform.js';
7
import { localize, localize2 } from '../../nls.js';
8
import { MenuRegistry, MenuId, registerAction2 } from '../../platform/actions/common/actions.js';
9
import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from '../../platform/configuration/common/configurationRegistry.js';
10
import { KeyMod, KeyCode } from '../../base/common/keyCodes.js';
11
import { isLinux, isMacintosh, isWindows } from '../../base/common/platform.js';
12
import { ConfigureRuntimeArgumentsAction, ToggleDevToolsAction, ReloadWindowWithExtensionsDisabledAction, OpenUserDataFolderAction, ShowGPUInfoAction, StopTracing } from './actions/developerActions.js';
13
import { ZoomResetAction, ZoomOutAction, ZoomInAction, CloseWindowAction, SwitchWindowAction, QuickSwitchWindowAction, NewWindowTabHandler, ShowPreviousWindowTabHandler, ShowNextWindowTabHandler, MoveWindowTabToNewWindowHandler, MergeWindowTabsHandlerHandler, ToggleWindowTabsBarHandler, ToggleWindowAlwaysOnTopAction, DisableWindowAlwaysOnTopAction, EnableWindowAlwaysOnTopAction } from './actions/windowActions.js';
14
import { ContextKeyExpr } from '../../platform/contextkey/common/contextkey.js';
15
import { KeybindingsRegistry, KeybindingWeight } from '../../platform/keybinding/common/keybindingsRegistry.js';
16
import { CommandsRegistry } from '../../platform/commands/common/commands.js';
17
import { ServicesAccessor } from '../../platform/instantiation/common/instantiation.js';
18
import { IsMacContext } from '../../platform/contextkey/common/contextkeys.js';
19
import { INativeHostService } from '../../platform/native/common/native.js';
20
import { IJSONContributionRegistry, Extensions as JSONExtensions } from '../../platform/jsonschemas/common/jsonContributionRegistry.js';
21
import { IJSONSchema } from '../../base/common/jsonSchema.js';
22
import { InstallShellScriptAction, UninstallShellScriptAction } from './actions/installActions.js';
23
import { EditorsVisibleContext, SingleEditorGroupsContext } from '../common/contextkeys.js';
24
import { TELEMETRY_SETTING_ID } from '../../platform/telemetry/common/telemetry.js';
25
import { IConfigurationService } from '../../platform/configuration/common/configuration.js';
26
import { ShutdownReason } from '../services/lifecycle/common/lifecycle.js';
27
import { NativeWindow } from './window.js';
28
import { ModifierKeyEmitter } from '../../base/browser/dom.js';
29
import { applicationConfigurationNodeBase, securityConfigurationNodeBase } from '../common/configuration.js';
30
import { MAX_ZOOM_LEVEL, MIN_ZOOM_LEVEL } from '../../platform/window/electron-browser/window.js';
31
import { DefaultAccountManagementContribution } from '../services/accounts/common/defaultAccount.js';
32
import { registerWorkbenchContribution2, WorkbenchPhase } from '../common/contributions.js';
33
34
// Actions
35
(function registerActions(): void {
36
37
// Actions: Zoom
38
registerAction2(ZoomInAction);
39
registerAction2(ZoomOutAction);
40
registerAction2(ZoomResetAction);
41
42
// Actions: Window
43
registerAction2(SwitchWindowAction);
44
registerAction2(QuickSwitchWindowAction);
45
registerAction2(CloseWindowAction);
46
registerAction2(ToggleWindowAlwaysOnTopAction);
47
registerAction2(EnableWindowAlwaysOnTopAction);
48
registerAction2(DisableWindowAlwaysOnTopAction);
49
50
if (isMacintosh) {
51
// macOS: behave like other native apps that have documents
52
// but can run without a document opened and allow to close
53
// the window when the last document is closed
54
// (https://github.com/microsoft/vscode/issues/126042)
55
KeybindingsRegistry.registerKeybindingRule({
56
id: CloseWindowAction.ID,
57
weight: KeybindingWeight.WorkbenchContrib,
58
when: ContextKeyExpr.and(EditorsVisibleContext.toNegated(), SingleEditorGroupsContext),
59
primary: KeyMod.CtrlCmd | KeyCode.KeyW
60
});
61
}
62
63
// Actions: Install Shell Script (macOS only)
64
if (isMacintosh) {
65
registerAction2(InstallShellScriptAction);
66
registerAction2(UninstallShellScriptAction);
67
}
68
69
// Quit
70
KeybindingsRegistry.registerCommandAndKeybindingRule({
71
id: 'workbench.action.quit',
72
weight: KeybindingWeight.WorkbenchContrib,
73
async handler(accessor: ServicesAccessor) {
74
const nativeHostService = accessor.get(INativeHostService);
75
const configurationService = accessor.get(IConfigurationService);
76
77
const confirmBeforeClose = configurationService.getValue<'always' | 'never' | 'keyboardOnly'>('window.confirmBeforeClose');
78
if (confirmBeforeClose === 'always' || (confirmBeforeClose === 'keyboardOnly' && ModifierKeyEmitter.getInstance().isModifierPressed)) {
79
const confirmed = await NativeWindow.confirmOnShutdown(accessor, ShutdownReason.QUIT);
80
if (!confirmed) {
81
return; // quit prevented by user
82
}
83
}
84
85
nativeHostService.quit();
86
},
87
when: undefined,
88
mac: { primary: KeyMod.CtrlCmd | KeyCode.KeyQ },
89
linux: { primary: KeyMod.CtrlCmd | KeyCode.KeyQ }
90
});
91
92
// Actions: macOS Native Tabs
93
if (isMacintosh) {
94
for (const command of [
95
{ handler: NewWindowTabHandler, id: 'workbench.action.newWindowTab', title: localize2('newTab', 'New Window Tab') },
96
{ handler: ShowPreviousWindowTabHandler, id: 'workbench.action.showPreviousWindowTab', title: localize2('showPreviousTab', 'Show Previous Window Tab') },
97
{ handler: ShowNextWindowTabHandler, id: 'workbench.action.showNextWindowTab', title: localize2('showNextWindowTab', 'Show Next Window Tab') },
98
{ handler: MoveWindowTabToNewWindowHandler, id: 'workbench.action.moveWindowTabToNewWindow', title: localize2('moveWindowTabToNewWindow', 'Move Window Tab to New Window') },
99
{ handler: MergeWindowTabsHandlerHandler, id: 'workbench.action.mergeAllWindowTabs', title: localize2('mergeAllWindowTabs', 'Merge All Windows') },
100
{ handler: ToggleWindowTabsBarHandler, id: 'workbench.action.toggleWindowTabsBar', title: localize2('toggleWindowTabsBar', 'Toggle Window Tabs Bar') }
101
]) {
102
CommandsRegistry.registerCommand(command.id, command.handler);
103
104
MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
105
command,
106
when: ContextKeyExpr.equals('config.window.nativeTabs', true)
107
});
108
}
109
}
110
111
// Actions: Developer
112
registerAction2(ReloadWindowWithExtensionsDisabledAction);
113
registerAction2(ConfigureRuntimeArgumentsAction);
114
registerAction2(ToggleDevToolsAction);
115
registerAction2(OpenUserDataFolderAction);
116
registerAction2(ShowGPUInfoAction);
117
registerAction2(StopTracing);
118
})();
119
120
// Menu
121
(function registerMenu(): void {
122
123
// Quit
124
MenuRegistry.appendMenuItem(MenuId.MenubarFileMenu, {
125
group: 'z_Exit',
126
command: {
127
id: 'workbench.action.quit',
128
title: localize({ key: 'miExit', comment: ['&& denotes a mnemonic'] }, "E&&xit")
129
},
130
order: 1,
131
when: IsMacContext.toNegated()
132
});
133
})();
134
135
// Configuration
136
(function registerConfiguration(): void {
137
const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);
138
139
// Application
140
registry.registerConfiguration({
141
...applicationConfigurationNodeBase,
142
'properties': {
143
'application.shellEnvironmentResolutionTimeout': {
144
'type': 'number',
145
'default': 10,
146
'minimum': 1,
147
'maximum': 120,
148
'included': !isWindows,
149
'scope': ConfigurationScope.APPLICATION,
150
'markdownDescription': localize('application.shellEnvironmentResolutionTimeout', "Controls the timeout in seconds before giving up resolving the shell environment when the application is not already launched from a terminal. See our [documentation](https://go.microsoft.com/fwlink/?linkid=2149667) for more information.")
151
}
152
}
153
});
154
155
// Window
156
registry.registerConfiguration({
157
'id': 'window',
158
'order': 8,
159
'title': localize('windowConfigurationTitle', "Window"),
160
'type': 'object',
161
'properties': {
162
'window.confirmSaveUntitledWorkspace': {
163
'type': 'boolean',
164
'default': true,
165
'description': localize('confirmSaveUntitledWorkspace', "Controls whether a confirmation dialog shows asking to save or discard an opened untitled workspace in the window when switching to another workspace. Disabling the confirmation dialog will always discard the untitled workspace."),
166
},
167
'window.openWithoutArgumentsInNewWindow': {
168
'type': 'string',
169
'enum': ['on', 'off'],
170
'enumDescriptions': [
171
localize('window.openWithoutArgumentsInNewWindow.on', "Open a new empty window."),
172
localize('window.openWithoutArgumentsInNewWindow.off', "Focus the last active running instance.")
173
],
174
'default': isMacintosh ? 'off' : 'on',
175
'scope': ConfigurationScope.APPLICATION,
176
'markdownDescription': localize('openWithoutArgumentsInNewWindow', "Controls whether a new empty window should open when starting a second instance without arguments or if the last running instance should get focus.\nNote that there can still be cases where this setting is ignored (e.g. when using the `--new-window` or `--reuse-window` command line option).")
177
},
178
'window.restoreWindows': {
179
'type': 'string',
180
'enum': ['preserve', 'all', 'folders', 'one', 'none'],
181
'enumDescriptions': [
182
localize('window.reopenFolders.preserve', "Always reopen all windows. If a folder or workspace is opened (e.g. from the command line) it opens as a new window unless it was opened before. If files are opened they will open in one of the restored windows together with editors that were previously opened."),
183
localize('window.reopenFolders.all', "Reopen all windows unless a folder, workspace or file is opened (e.g. from the command line). If a file is opened, it will replace any of the editors that were previously opened in a window."),
184
localize('window.reopenFolders.folders', "Reopen all windows that had folders or workspaces opened unless a folder, workspace or file is opened (e.g. from the command line). If a file is opened, it will replace any of the editors that were previously opened in a window."),
185
localize('window.reopenFolders.one', "Reopen the last active window unless a folder, workspace or file is opened (e.g. from the command line). If a file is opened, it will replace any of the editors that were previously opened in a window."),
186
localize('window.reopenFolders.none', "Never reopen a window. Unless a folder or workspace is opened (e.g. from the command line), an empty window will appear.")
187
],
188
'default': 'all',
189
'scope': ConfigurationScope.APPLICATION,
190
'description': localize('restoreWindows', "Controls how windows and editors within are being restored when opening.")
191
},
192
'window.restoreFullscreen': {
193
'type': 'boolean',
194
'default': false,
195
'scope': ConfigurationScope.APPLICATION,
196
'description': localize('restoreFullscreen', "Controls whether a window should restore to full screen mode if it was exited in full screen mode.")
197
},
198
'window.zoomLevel': {
199
'type': 'number',
200
'default': 0,
201
'minimum': MIN_ZOOM_LEVEL,
202
'maximum': MAX_ZOOM_LEVEL,
203
'markdownDescription': localize({ comment: ['{0} will be a setting name rendered as a link'], key: 'zoomLevel' }, "Adjust the default zoom level for all windows. Each increment above `0` (e.g. `1`) or below (e.g. `-1`) represents zooming `20%` larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity. See {0} for configuring if the 'Zoom In' and 'Zoom Out' commands apply the zoom level to all windows or only the active window.", '`#window.zoomPerWindow#`'),
204
ignoreSync: true,
205
tags: ['accessibility']
206
},
207
'window.zoomPerWindow': {
208
'type': 'boolean',
209
'default': true,
210
'markdownDescription': localize({ comment: ['{0} will be a setting name rendered as a link'], key: 'zoomPerWindow' }, "Controls if the 'Zoom In' and 'Zoom Out' commands apply the zoom level to all windows or only the active window. See {0} for configuring a default zoom level for all windows.", '`#window.zoomLevel#`'),
211
tags: ['accessibility']
212
},
213
'window.newWindowDimensions': {
214
'type': 'string',
215
'enum': ['default', 'inherit', 'offset', 'maximized', 'fullscreen'],
216
'enumDescriptions': [
217
localize('window.newWindowDimensions.default', "Open new windows in the center of the screen."),
218
localize('window.newWindowDimensions.inherit', "Open new windows with same dimension as last active one."),
219
localize('window.newWindowDimensions.offset', "Open new windows with same dimension as last active one with an offset position."),
220
localize('window.newWindowDimensions.maximized', "Open new windows maximized."),
221
localize('window.newWindowDimensions.fullscreen', "Open new windows in full screen mode.")
222
],
223
'default': 'default',
224
'scope': ConfigurationScope.APPLICATION,
225
'description': localize('newWindowDimensions', "Controls the dimensions of opening a new window when at least one window is already opened. Note that this setting does not have an impact on the first window that is opened. The first window will always restore the size and location as you left it before closing.")
226
},
227
'window.closeWhenEmpty': {
228
'type': 'boolean',
229
'default': false,
230
'description': localize('closeWhenEmpty', "Controls whether closing the last editor should also close the window. This setting only applies for windows that do not show folders.")
231
},
232
'window.doubleClickIconToClose': {
233
'type': 'boolean',
234
'default': false,
235
'scope': ConfigurationScope.APPLICATION,
236
'markdownDescription': localize('window.doubleClickIconToClose', "If enabled, this setting will close the window when the application icon in the title bar is double-clicked. The window will not be able to be dragged by the icon. This setting is effective only if {0} is set to `custom`.", '`#window.titleBarStyle#`')
237
},
238
'window.titleBarStyle': {
239
'type': 'string',
240
'enum': ['native', 'custom'],
241
'default': 'custom',
242
'scope': ConfigurationScope.APPLICATION,
243
'description': localize('titleBarStyle', "Adjust the appearance of the window title bar to be native by the OS or custom. Changes require a full restart to apply."),
244
},
245
'window.controlsStyle': {
246
'type': 'string',
247
'enum': ['native', 'custom', 'hidden'],
248
'default': 'native',
249
'included': !isMacintosh,
250
'scope': ConfigurationScope.APPLICATION,
251
'description': localize('controlsStyle', "Adjust the appearance of the window controls to be native by the OS, custom drawn or hidden. Changes require a full restart to apply."),
252
},
253
'window.customTitleBarVisibility': {
254
'type': 'string',
255
'enum': ['auto', 'windowed', 'never'],
256
'markdownEnumDescriptions': [
257
localize(`window.customTitleBarVisibility.auto`, "Automatically changes custom title bar visibility."),
258
localize(`window.customTitleBarVisibility.windowed`, "Hide custom titlebar in full screen. When not in full screen, automatically change custom title bar visibility."),
259
localize(`window.customTitleBarVisibility.never`, "Hide custom titlebar when {0} is set to `native`.", '`#window.titleBarStyle#`'),
260
],
261
'default': 'auto',
262
'scope': ConfigurationScope.APPLICATION,
263
'markdownDescription': localize('window.customTitleBarVisibility', "Adjust when the custom title bar should be shown. The custom title bar can be hidden when in full screen mode with `windowed`. The custom title bar can only be hidden in non full screen mode with `never` when {0} is set to `native`.", '`#window.titleBarStyle#`'),
264
},
265
'window.menuStyle': {
266
'type': 'string',
267
'enum': ['custom', 'native', 'inherit'],
268
'markdownEnumDescriptions': isMacintosh ?
269
[
270
localize(`window.menuStyle.custom.mac`, "Use the custom context menu."),
271
localize(`window.menuStyle.native.mac`, "Use the native context menu."),
272
localize(`window.menuStyle.inherit.mac`, "Matches the context menu style to the title bar style defined in {0}.", '`#window.titleBarStyle#`'),
273
] :
274
[
275
localize(`window.menuStyle.custom`, "Use the custom menu."),
276
localize(`window.menuStyle.native`, "Use the native menu. This is ignored when {0} is set to {1}.", '`#window.titleBarStyle#`', '`custom`'),
277
localize(`window.menuStyle.inherit`, "Matches the menu style to the title bar style defined in {0}.", '`#window.titleBarStyle#`'),
278
],
279
'default': isMacintosh ? 'native' : 'inherit',
280
'scope': ConfigurationScope.APPLICATION,
281
'markdownDescription': isMacintosh ?
282
localize('window.menuStyle.mac', "Adjust the context menu appearances to either be native by the OS, custom, or inherited from the title bar style defined in {0}.", '`#window.titleBarStyle#`') :
283
localize('window.menuStyle', "Adjust the menu style to either be native by the OS, custom, or inherited from the title bar style defined in {0}. This also affects the context menu appearance. Changes require a full restart to apply.", '`#window.titleBarStyle#`'),
284
},
285
'window.dialogStyle': {
286
'type': 'string',
287
'enum': ['native', 'custom'],
288
'default': 'native',
289
'scope': ConfigurationScope.APPLICATION,
290
'description': localize('dialogStyle', "Adjust the appearance of dialogs to be native by the OS or custom.")
291
},
292
'window.nativeTabs': {
293
'type': 'boolean',
294
'default': false,
295
'scope': ConfigurationScope.APPLICATION,
296
'description': localize('window.nativeTabs', "Enables macOS native window tabs. Note that changes require a full restart to apply and that native tabs will disable a custom title bar style if configured."),
297
'included': isMacintosh,
298
},
299
'window.nativeFullScreen': {
300
'type': 'boolean',
301
'default': true,
302
'description': localize('window.nativeFullScreen', "Controls if native full-screen should be used on macOS. Disable this option to prevent macOS from creating a new space when going full-screen."),
303
'scope': ConfigurationScope.APPLICATION,
304
'included': isMacintosh
305
},
306
'window.clickThroughInactive': {
307
'type': 'boolean',
308
'default': true,
309
'scope': ConfigurationScope.APPLICATION,
310
'description': localize('window.clickThroughInactive', "If enabled, clicking on an inactive window will both activate the window and trigger the element under the mouse if it is clickable. If disabled, clicking anywhere on an inactive window will activate it only and a second click is required on the element."),
311
'included': isMacintosh
312
},
313
'window.border': {
314
'type': 'string',
315
'default': 'default',
316
'markdownDescription': (() => {
317
let windowBorderDescription = localize('window.border.prefix', "Controls the border color of the window:");
318
windowBorderDescription += '\n- ' + [
319
localize('window.border.default', "{0}: respect color theme settings, fallback to Windows settings", '`default`'),
320
localize('window.border.system', "{0}: respect Windows settings only", '`system`'),
321
localize('window.border.off', "{0}: disable border colors", '`off`'),
322
localize('window.border.color', "{0}: specific color in Hex, RGB, RGBA, HSL, HSLA format", '`<color>`'),
323
].join('\n- ');
324
windowBorderDescription += '\n\n' + localize('window.border.suffix', "Use {0} to set different colors for active and inactive windows. This setting is ignored when {1} is set to {2}.", '`#workbench.colorCustomizations#`', '`#window.titleBarStyle#`', '`native`');
325
326
return windowBorderDescription;
327
})(),
328
'included': isWindows
329
}
330
}
331
});
332
333
// Telemetry
334
registry.registerConfiguration({
335
'id': 'telemetry',
336
'order': 110,
337
title: localize('telemetryConfigurationTitle', "Telemetry"),
338
'type': 'object',
339
'properties': {
340
'telemetry.enableCrashReporter': {
341
'type': 'boolean',
342
'description': localize('telemetry.enableCrashReporting', "Enable crash reports to be collected. This helps us improve stability. \nThis option requires restart to take effect."),
343
'default': true,
344
'tags': ['usesOnlineServices', 'telemetry'],
345
'markdownDeprecationMessage': localize('enableCrashReporterDeprecated', "If this setting is false, no telemetry will be sent regardless of the new setting's value. Deprecated due to being combined into the {0} setting.", `\`#${TELEMETRY_SETTING_ID}#\``),
346
}
347
}
348
});
349
350
// Keybinding
351
registry.registerConfiguration({
352
'id': 'keyboard',
353
'order': 15,
354
'type': 'object',
355
'title': localize('keyboardConfigurationTitle', "Keyboard"),
356
'properties': {
357
'keyboard.touchbar.enabled': {
358
'type': 'boolean',
359
'default': true,
360
'description': localize('touchbar.enabled', "Enables the macOS touchbar buttons on the keyboard if available."),
361
'included': isMacintosh
362
},
363
'keyboard.touchbar.ignored': {
364
'type': 'array',
365
'items': {
366
'type': 'string'
367
},
368
'default': [],
369
'markdownDescription': localize('touchbar.ignored', 'A set of identifiers for entries in the touchbar that should not show up (for example `workbench.action.navigateBack`).'),
370
'included': isMacintosh
371
}
372
}
373
});
374
375
// Security
376
registry.registerConfiguration({
377
...securityConfigurationNodeBase,
378
'properties': {
379
'security.promptForLocalFileProtocolHandling': {
380
'type': 'boolean',
381
'default': true,
382
'markdownDescription': localize('security.promptForLocalFileProtocolHandling', 'If enabled, a dialog will ask for confirmation whenever a local file or workspace is about to open through a protocol handler.'),
383
'scope': ConfigurationScope.APPLICATION
384
},
385
'security.promptForRemoteFileProtocolHandling': {
386
'type': 'boolean',
387
'default': true,
388
'markdownDescription': localize('security.promptForRemoteFileProtocolHandling', 'If enabled, a dialog will ask for confirmation whenever a remote file or workspace is about to open through a protocol handler.'),
389
'scope': ConfigurationScope.APPLICATION
390
}
391
}
392
});
393
})();
394
395
// JSON Schemas
396
(function registerJSONSchemas(): void {
397
const argvDefinitionFileSchemaId = 'vscode://schemas/argv';
398
const jsonRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
399
const schema: IJSONSchema = {
400
id: argvDefinitionFileSchemaId,
401
allowComments: true,
402
allowTrailingCommas: true,
403
description: 'VSCode static command line definition file',
404
type: 'object',
405
additionalProperties: false,
406
properties: {
407
locale: {
408
type: 'string',
409
description: localize('argv.locale', 'The display Language to use. Picking a different language requires the associated language pack to be installed.')
410
},
411
'disable-lcd-text': {
412
type: 'boolean',
413
description: localize('argv.disableLcdText', 'Disables LCD font antialiasing.')
414
},
415
'proxy-bypass-list': {
416
type: 'string',
417
description: localize('argv.proxyBypassList', 'Bypass any specified proxy for the given semi-colon-separated list of hosts. Example value "<local>;*.microsoft.com;*foo.com;1.2.3.4:5678", will use the proxy server for all hosts except for local addresses (localhost, 127.0.0.1 etc.), microsoft.com subdomains, hosts that contain the suffix foo.com and anything at 1.2.3.4:5678')
418
},
419
'disable-hardware-acceleration': {
420
type: 'boolean',
421
description: localize('argv.disableHardwareAcceleration', 'Disables hardware acceleration. ONLY change this option if you encounter graphic issues.')
422
},
423
'force-color-profile': {
424
type: 'string',
425
markdownDescription: localize('argv.forceColorProfile', 'Allows to override the color profile to use. If you experience colors appear badly, try to set this to `srgb` and restart.')
426
},
427
'enable-crash-reporter': {
428
type: 'boolean',
429
markdownDescription: localize('argv.enableCrashReporter', 'Allows to disable crash reporting, should restart the app if the value is changed.')
430
},
431
'crash-reporter-id': {
432
type: 'string',
433
markdownDescription: localize('argv.crashReporterId', 'Unique id used for correlating crash reports sent from this app instance.')
434
},
435
'enable-proposed-api': {
436
type: 'array',
437
description: localize('argv.enebleProposedApi', "Enable proposed APIs for a list of extension ids (such as \`vscode.git\`). Proposed APIs are unstable and subject to breaking without warning at any time. This should only be set for extension development and testing purposes."),
438
items: {
439
type: 'string'
440
}
441
},
442
'log-level': {
443
type: ['string', 'array'],
444
description: localize('argv.logLevel', "Log level to use. Default is 'info'. Allowed values are 'error', 'warn', 'info', 'debug', 'trace', 'off'.")
445
},
446
'disable-chromium-sandbox': {
447
type: 'boolean',
448
description: localize('argv.disableChromiumSandbox', "Disables the Chromium sandbox. This is useful when running VS Code as elevated on Linux and running under Applocker on Windows.")
449
},
450
'use-inmemory-secretstorage': {
451
type: 'boolean',
452
description: localize('argv.useInMemorySecretStorage', "Ensures that an in-memory store will be used for secret storage instead of using the OS's credential store. This is often used when running VS Code extension tests or when you're experiencing difficulties with the credential store.")
453
},
454
'remote-debugging-port': {
455
type: 'string',
456
description: localize('argv.remoteDebuggingPort', "Specifies the port to use for remote debugging.")
457
}
458
}
459
};
460
if (isLinux) {
461
schema.properties!['force-renderer-accessibility'] = {
462
type: 'boolean',
463
description: localize('argv.force-renderer-accessibility', 'Forces the renderer to be accessible. ONLY change this if you are using a screen reader on Linux. On other platforms the renderer will automatically be accessible. This flag is automatically set if you have editor.accessibilitySupport: on.'),
464
};
465
schema.properties!['password-store'] = {
466
type: 'string',
467
description: localize('argv.passwordStore', "Configures the backend used to store secrets on Linux. This argument is ignored on Windows & macOS.")
468
};
469
}
470
if (isWindows) {
471
schema.properties!['enable-rdp-display-tracking'] = {
472
type: 'boolean',
473
description: localize('argv.enableRDPDisplayTracking', "Ensures that maximized windows gets restored to correct display during RDP reconnection.")
474
};
475
}
476
477
jsonRegistry.registerSchema(argvDefinitionFileSchemaId, schema);
478
})();
479
480
(function registerWorkbenchContributions(): void {
481
registerWorkbenchContribution2('workbench.contributions.defaultAccountManagement', DefaultAccountManagementContribution, WorkbenchPhase.AfterRestored);
482
})();
483
484