Path: blob/main/src/vs/workbench/browser/workbench.contribution.ts
3294 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import { isStandalone } from '../../base/browser/browser.js';6import { isLinux, isMacintosh, isNative, isWeb, isWindows } from '../../base/common/platform.js';7import { localize } from '../../nls.js';8import { Extensions as ConfigurationExtensions, ConfigurationScope, IConfigurationRegistry } from '../../platform/configuration/common/configurationRegistry.js';9import { Registry } from '../../platform/registry/common/platform.js';10import { ConfigurationKeyValuePairs, ConfigurationMigrationWorkbenchContribution, DynamicWindowConfiguration, DynamicWorkbenchSecurityConfiguration, Extensions, IConfigurationMigrationRegistry, problemsConfigurationNodeBase, windowConfigurationNodeBase, workbenchConfigurationNodeBase } from '../common/configuration.js';11import { WorkbenchPhase, registerWorkbenchContribution2 } from '../common/contributions.js';12import { CustomEditorLabelService } from '../services/editor/common/customEditorLabelService.js';13import { ActivityBarPosition, EditorActionsLocation, EditorTabsMode, LayoutSettings } from '../services/layout/browser/layoutService.js';14import { defaultWindowTitle, defaultWindowTitleSeparator } from './parts/titlebar/windowTitle.js';1516const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration);1718// Configuration19(function registerConfiguration(): void {2021// Migration support22registerWorkbenchContribution2(ConfigurationMigrationWorkbenchContribution.ID, ConfigurationMigrationWorkbenchContribution, WorkbenchPhase.Eventually);2324// Dynamic Configuration25registerWorkbenchContribution2(DynamicWorkbenchSecurityConfiguration.ID, DynamicWorkbenchSecurityConfiguration, WorkbenchPhase.AfterRestored);2627// Workbench28registry.registerConfiguration({29...workbenchConfigurationNodeBase,30'properties': {31'workbench.externalBrowser': {32type: 'string',33markdownDescription: localize('browser', "Configure the browser to use for opening http or https links externally. This can either be the name of the browser (`edge`, `chrome`, `firefox`) or an absolute path to the browser's executable. Will use the system default if not set."),34included: isNative,35restricted: true36},37'workbench.editor.titleScrollbarSizing': {38type: 'string',39enum: ['default', 'large'],40enumDescriptions: [41localize('workbench.editor.titleScrollbarSizing.default', "The default size."),42localize('workbench.editor.titleScrollbarSizing.large', "Increases the size, so it can be grabbed more easily with the mouse.")43],44description: localize('tabScrollbarHeight', "Controls the height of the scrollbars used for tabs and breadcrumbs in the editor title area."),45default: 'default',46},47'workbench.editor.titleScrollbarVisibility': {48type: 'string',49enum: ['auto', 'visible', 'hidden'],50enumDescriptions: [51localize('workbench.editor.titleScrollbarVisibility.auto', "The horizontal scrollbar will be visible only when necessary."),52localize('workbench.editor.titleScrollbarVisibility.visible', "The horizontal scrollbar will always be visible."),53localize('workbench.editor.titleScrollbarVisibility.hidden', "The horizontal scrollbar will always be hidden.")54],55description: localize('titleScrollbarVisibility', "Controls the visibility of the scrollbars used for tabs and breadcrumbs in the editor title area."),56default: 'auto',57},58[LayoutSettings.EDITOR_TABS_MODE]: {59'type': 'string',60'enum': [EditorTabsMode.MULTIPLE, EditorTabsMode.SINGLE, EditorTabsMode.NONE],61'enumDescriptions': [62localize('workbench.editor.showTabs.multiple', "Each editor is displayed as a tab in the editor title area."),63localize('workbench.editor.showTabs.single', "The active editor is displayed as a single large tab in the editor title area."),64localize('workbench.editor.showTabs.none', "The editor title area is not displayed."),65],66'description': localize('showEditorTabs', "Controls whether opened editors should show as individual tabs, one single large tab or if the title area should not be shown."),67'default': 'multiple'68},69[LayoutSettings.EDITOR_ACTIONS_LOCATION]: {70'type': 'string',71'enum': [EditorActionsLocation.DEFAULT, EditorActionsLocation.TITLEBAR, EditorActionsLocation.HIDDEN],72'markdownEnumDescriptions': [73localize({ comment: ['{0} will be a setting name rendered as a link'], key: 'workbench.editor.editorActionsLocation.default' }, "Show editor actions in the window title bar when {0} is set to {1}. Otherwise, editor actions are shown in the editor tab bar.", '`#workbench.editor.showTabs#`', '`none`'),74localize({ comment: ['{0} will be a setting name rendered as a link'], key: 'workbench.editor.editorActionsLocation.titleBar' }, "Show editor actions in the window title bar. If {0} is set to {1}, editor actions are hidden.", '`#window.customTitleBarVisibility#`', '`never`'),75localize('workbench.editor.editorActionsLocation.hidden', "Editor actions are not shown."),76],77'markdownDescription': localize('editorActionsLocation', "Controls where the editor actions are shown."),78'default': 'default'79},80'workbench.editor.alwaysShowEditorActions': {81'type': 'boolean',82'markdownDescription': localize('alwaysShowEditorActions', "Controls whether to always show the editor actions, even when the editor group is not active."),83'default': false84},85'workbench.editor.wrapTabs': {86'type': 'boolean',87'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'wrapTabs' }, "Controls whether tabs should be wrapped over multiple lines when exceeding available space or whether a scrollbar should appear instead. This value is ignored when {0} is not set to '{1}'.", '`#workbench.editor.showTabs#`', '`multiple`'),88'default': false89},90'workbench.editor.scrollToSwitchTabs': {91'type': 'boolean',92'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'scrollToSwitchTabs' }, "Controls whether scrolling over tabs will open them or not. By default tabs will only reveal upon scrolling, but not open. You can press and hold the Shift-key while scrolling to change this behavior for that duration. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`'),93'default': false94},95'workbench.editor.highlightModifiedTabs': {96'type': 'boolean',97'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'highlightModifiedTabs' }, "Controls whether a top border is drawn on tabs for editors that have unsaved changes. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', `multiple`),98'default': false99},100'workbench.editor.decorations.badges': {101'type': 'boolean',102'markdownDescription': localize('decorations.badges', "Controls whether editor file decorations should use badges."),103'default': true104},105'workbench.editor.decorations.colors': {106'type': 'boolean',107'markdownDescription': localize('decorations.colors', "Controls whether editor file decorations should use colors."),108'default': true109},110[CustomEditorLabelService.SETTING_ID_ENABLED]: {111'type': 'boolean',112'markdownDescription': localize('workbench.editor.label.enabled', "Controls whether the custom workbench editor labels should be applied."),113'default': true,114},115[CustomEditorLabelService.SETTING_ID_PATTERNS]: {116'type': 'object',117'markdownDescription': (() => {118let customEditorLabelDescription = localize('workbench.editor.label.patterns', "Controls the rendering of the editor label. Each __Item__ is a pattern that matches a file path. Both relative and absolute file paths are supported. The relative path must include the WORKSPACE_FOLDER (e.g `WORKSPACE_FOLDER/src/**.tsx` or `*/src/**.tsx`). Absolute patterns must start with a `/`. In case multiple patterns match, the longest matching path will be picked. Each __Value__ is the template for the rendered editor when the __Item__ matches. Variables are substituted based on the context:");119customEditorLabelDescription += '\n- ' + [120localize('workbench.editor.label.dirname', "`${dirname}`: name of the folder in which the file is located (e.g. `WORKSPACE_FOLDER/folder/file.txt -> folder`)."),121localize('workbench.editor.label.nthdirname', "`${dirname(N)}`: name of the nth parent folder in which the file is located (e.g. `N=2: WORKSPACE_FOLDER/static/folder/file.txt -> WORKSPACE_FOLDER`). Folders can be picked from the start of the path by using negative numbers (e.g. `N=-1: WORKSPACE_FOLDER/folder/file.txt -> WORKSPACE_FOLDER`). If the __Item__ is an absolute pattern path, the first folder (`N=-1`) refers to the first folder in the absolute path, otherwise it corresponds to the workspace folder."),122localize('workbench.editor.label.filename', "`${filename}`: name of the file without the file extension (e.g. `WORKSPACE_FOLDER/folder/file.txt -> file`)."),123localize('workbench.editor.label.extname', "`${extname}`: the file extension (e.g. `WORKSPACE_FOLDER/folder/file.txt -> txt`)."),124localize('workbench.editor.label.nthextname', "`${extname(N)}`: the nth extension of the file separated by '.' (e.g. `N=2: WORKSPACE_FOLDER/folder/file.ext1.ext2.ext3 -> ext1`). Extension can be picked from the start of the extension by using negative numbers (e.g. `N=-1: WORKSPACE_FOLDER/folder/file.ext1.ext2.ext3 -> ext2`)."),125].join('\n- '); // intentionally concatenated to not produce a string that is too long for translations126customEditorLabelDescription += '\n\n' + localize('customEditorLabelDescriptionExample', "Example: `\"**/static/**/*.html\": \"${filename} - ${dirname} (${extname})\"` will render a file `WORKSPACE_FOLDER/static/folder/file.html` as `file - folder (html)`.");127128return customEditorLabelDescription;129})(),130additionalProperties:131{132type: ['string', 'null'],133markdownDescription: localize('workbench.editor.label.template', "The template which should be rendered when the pattern matches. May include the variables ${dirname}, ${filename} and ${extname}."),134minLength: 1,135pattern: '.*[a-zA-Z0-9].*'136},137'default': {}138},139'workbench.editor.labelFormat': {140'type': 'string',141'enum': ['default', 'short', 'medium', 'long'],142'enumDescriptions': [143localize('workbench.editor.labelFormat.default', "Show the name of the file. When tabs are enabled and two files have the same name in one group the distinguishing sections of each file's path are added. When tabs are disabled, the path relative to the workspace folder is shown if the editor is active."),144localize('workbench.editor.labelFormat.short', "Show the name of the file followed by its directory name."),145localize('workbench.editor.labelFormat.medium', "Show the name of the file followed by its path relative to the workspace folder."),146localize('workbench.editor.labelFormat.long', "Show the name of the file followed by its absolute path.")147],148'default': 'default',149'description': localize('tabDescription', "Controls the format of the label for an editor."),150},151'workbench.editor.untitled.labelFormat': {152'type': 'string',153'enum': ['content', 'name'],154'enumDescriptions': [155localize('workbench.editor.untitled.labelFormat.content', "The name of the untitled file is derived from the contents of its first line unless it has an associated file path. It will fallback to the name in case the line is empty or contains no word characters."),156localize('workbench.editor.untitled.labelFormat.name', "The name of the untitled file is not derived from the contents of the file."),157],158'default': 'content',159'description': localize('untitledLabelFormat', "Controls the format of the label for an untitled editor."),160},161'workbench.editor.empty.hint': {162'type': 'string',163'enum': ['text', 'hidden'],164'default': 'text',165'markdownDescription': localize("workbench.editor.empty.hint", "Controls if the empty editor text hint should be visible in the editor.")166},167'workbench.editor.languageDetection': {168type: 'boolean',169default: true,170description: localize('workbench.editor.languageDetection', "Controls whether the language in a text editor is automatically detected unless the language has been explicitly set by the language picker. This can also be scoped by language so you can specify which languages you do not want to be switched off of. This is useful for languages like Markdown that often contain other languages that might trick language detection into thinking it's the embedded language and not Markdown."),171scope: ConfigurationScope.LANGUAGE_OVERRIDABLE172},173'workbench.editor.historyBasedLanguageDetection': {174type: 'boolean',175default: true,176description: localize('workbench.editor.historyBasedLanguageDetection', "Enables use of editor history in language detection. This causes automatic language detection to favor languages that have been recently opened and allows for automatic language detection to operate with smaller inputs."),177},178'workbench.editor.preferHistoryBasedLanguageDetection': {179type: 'boolean',180default: false,181description: localize('workbench.editor.preferBasedLanguageDetection', "When enabled, a language detection model that takes into account editor history will be given higher precedence."),182},183'workbench.editor.languageDetectionHints': {184type: 'object',185default: { 'untitledEditors': true, 'notebookEditors': true },186description: localize('workbench.editor.showLanguageDetectionHints', "When enabled, shows a Status bar Quick Fix when the editor language doesn't match detected content language."),187additionalProperties: false,188properties: {189untitledEditors: {190type: 'boolean',191description: localize('workbench.editor.showLanguageDetectionHints.editors', "Show in untitled text editors"),192},193notebookEditors: {194type: 'boolean',195description: localize('workbench.editor.showLanguageDetectionHints.notebook', "Show in notebook editors"),196}197}198},199'workbench.editor.tabActionLocation': {200type: 'string',201enum: ['left', 'right'],202default: 'right',203markdownDescription: localize({ comment: ['{0} will be a setting name rendered as a link'], key: 'tabActionLocation' }, "Controls the position of the editor's tabs action buttons (close, unpin). This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`')204},205'workbench.editor.tabActionCloseVisibility': {206type: 'boolean',207default: true,208description: localize('workbench.editor.tabActionCloseVisibility', "Controls the visibility of the tab close action button.")209},210'workbench.editor.tabActionUnpinVisibility': {211type: 'boolean',212default: true,213description: localize('workbench.editor.tabActionUnpinVisibility', "Controls the visibility of the tab unpin action button.")214},215'workbench.editor.showTabIndex': {216'type': 'boolean',217'default': false,218'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'showTabIndex' }, "When enabled, will show the tab index. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`')219},220'workbench.editor.tabSizing': {221'type': 'string',222'enum': ['fit', 'shrink', 'fixed'],223'default': 'fit',224'enumDescriptions': [225localize('workbench.editor.tabSizing.fit', "Always keep tabs large enough to show the full editor label."),226localize('workbench.editor.tabSizing.shrink', "Allow tabs to get smaller when the available space is not enough to show all tabs at once."),227localize('workbench.editor.tabSizing.fixed', "Make all tabs the same size, while allowing them to get smaller when the available space is not enough to show all tabs at once.")228],229'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'tabSizing' }, "Controls the size of editor tabs. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`')230},231'workbench.editor.tabSizingFixedMinWidth': {232'type': 'number',233'default': 50,234'minimum': 38,235'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'workbench.editor.tabSizingFixedMinWidth' }, "Controls the minimum width of tabs when {0} size is set to {1}.", '`#workbench.editor.tabSizing#`', '`fixed`')236},237'workbench.editor.tabSizingFixedMaxWidth': {238'type': 'number',239'default': 160,240'minimum': 38,241'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'workbench.editor.tabSizingFixedMaxWidth' }, "Controls the maximum width of tabs when {0} size is set to {1}.", '`#workbench.editor.tabSizing#`', '`fixed`')242},243'window.density.editorTabHeight': {244'type': 'string',245'enum': ['default', 'compact'],246'default': 'default',247'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'workbench.editor.tabHeight' }, "Controls the height of editor tabs. Also applies to the title control bar when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`')248},249'workbench.editor.pinnedTabSizing': {250'type': 'string',251'enum': ['normal', 'compact', 'shrink'],252'default': 'normal',253'enumDescriptions': [254localize('workbench.editor.pinnedTabSizing.normal', "A pinned tab inherits the look of non pinned tabs."),255localize('workbench.editor.pinnedTabSizing.compact', "A pinned tab will show in a compact form with only icon or first letter of the editor name."),256localize('workbench.editor.pinnedTabSizing.shrink', "A pinned tab shrinks to a compact fixed size showing parts of the editor name.")257],258'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'pinnedTabSizing' }, "Controls the size of pinned editor tabs. Pinned tabs are sorted to the beginning of all opened tabs and typically do not close until unpinned. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`')259},260'workbench.editor.pinnedTabsOnSeparateRow': {261'type': 'boolean',262'default': false,263'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'workbench.editor.pinnedTabsOnSeparateRow' }, "When enabled, displays pinned tabs in a separate row above all other tabs. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`'),264},265'workbench.editor.preventPinnedEditorClose': {266'type': 'string',267'enum': ['keyboardAndMouse', 'keyboard', 'mouse', 'never'],268'default': 'keyboardAndMouse',269'enumDescriptions': [270localize('workbench.editor.preventPinnedEditorClose.always', "Always prevent closing the pinned editor when using mouse middle click or keyboard."),271localize('workbench.editor.preventPinnedEditorClose.onlyKeyboard', "Prevent closing the pinned editor when using the keyboard."),272localize('workbench.editor.preventPinnedEditorClose.onlyMouse', "Prevent closing the pinned editor when using mouse middle click."),273localize('workbench.editor.preventPinnedEditorClose.never', "Never prevent closing a pinned editor.")274],275description: localize('workbench.editor.preventPinnedEditorClose', "Controls whether pinned editors should close when keyboard or middle mouse click is used for closing."),276},277'workbench.editor.splitSizing': {278'type': 'string',279'enum': ['auto', 'distribute', 'split'],280'default': 'auto',281'enumDescriptions': [282localize('workbench.editor.splitSizingAuto', "Splits the active editor group to equal parts, unless all editor groups are already in equal parts. In that case, splits all the editor groups to equal parts."),283localize('workbench.editor.splitSizingDistribute', "Splits all the editor groups to equal parts."),284localize('workbench.editor.splitSizingSplit', "Splits the active editor group to equal parts.")285],286'description': localize('splitSizing', "Controls the size of editor groups when splitting them.")287},288'workbench.editor.splitOnDragAndDrop': {289'type': 'boolean',290'default': true,291'description': localize('splitOnDragAndDrop', "Controls if editor groups can be split from drag and drop operations by dropping an editor or file on the edges of the editor area.")292},293'workbench.editor.dragToOpenWindow': {294'type': 'boolean',295'default': true,296'markdownDescription': localize('dragToOpenWindow', "Controls if editors can be dragged out of the window to open them in a new window. Press and hold the `Alt` key while dragging to toggle this dynamically.")297},298'workbench.editor.focusRecentEditorAfterClose': {299'type': 'boolean',300'description': localize('focusRecentEditorAfterClose', "Controls whether editors are closed in most recently used order or from left to right."),301'default': true302},303'workbench.editor.showIcons': {304'type': 'boolean',305'description': localize('showIcons', "Controls whether opened editors should show with an icon or not. This requires a file icon theme to be enabled as well."),306'default': true307},308'workbench.editor.enablePreview': {309'type': 'boolean',310'description': localize('enablePreview', "Controls whether preview mode is used when editors open. There is a maximum of one preview mode editor per editor group. This editor displays its filename in italics on its tab or title label and in the Open Editors view. Its contents will be replaced by the next editor opened in preview mode. Making a change in a preview mode editor will persist it, as will a double-click on its label, or the 'Keep Open' option in its label context menu. Opening a file from Explorer with a double-click persists its editor immediately."),311'default': true312},313'workbench.editor.enablePreviewFromQuickOpen': {314'type': 'boolean',315'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'enablePreviewFromQuickOpen' }, "Controls whether editors opened from Quick Open show as preview editors. Preview editors do not stay open, and are reused until explicitly set to be kept open (via double-click or editing). When enabled, hold Ctrl before selection to open an editor as a non-preview. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`'),316'default': false317},318'workbench.editor.enablePreviewFromCodeNavigation': {319'type': 'boolean',320'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'enablePreviewFromCodeNavigation' }, "Controls whether editors remain in preview when a code navigation is started from them. Preview editors do not stay open, and are reused until explicitly set to be kept open (via double-click or editing). This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`'),321'default': false322},323'workbench.editor.closeOnFileDelete': {324'type': 'boolean',325'description': localize('closeOnFileDelete', "Controls whether editors showing a file that was opened during the session should close automatically when getting deleted or renamed by some other process. Disabling this will keep the editor open on such an event. Note that deleting from within the application will always close the editor and that editors with unsaved changes will never close to preserve your data."),326'default': false327},328'workbench.editor.openPositioning': {329'type': 'string',330'enum': ['left', 'right', 'first', 'last'],331'default': 'right',332'markdownDescription': localize({ comment: ['{0}, {1}, {2}, {3} will be a setting name rendered as a link'], key: 'editorOpenPositioning' }, "Controls where editors open. Select {0} or {1} to open editors to the left or right of the currently active one. Select {2} or {3} to open editors independently from the currently active one.", '`left`', '`right`', '`first`', '`last`')333},334'workbench.editor.openSideBySideDirection': {335'type': 'string',336'enum': ['right', 'down'],337'default': 'right',338'markdownDescription': localize('sideBySideDirection', "Controls the default direction of editors that are opened side by side (for example, from the Explorer). By default, editors will open on the right hand side of the currently active one. If changed to `down`, the editors will open below the currently active one. This also impacts the split editor action in the editor toolbar.")339},340'workbench.editor.closeEmptyGroups': {341'type': 'boolean',342'description': localize('closeEmptyGroups', "Controls the behavior of empty editor groups when the last tab in the group is closed. When enabled, empty groups will automatically close. When disabled, empty groups will remain part of the grid."),343'default': true344},345'workbench.editor.revealIfOpen': {346'type': 'boolean',347'description': localize('revealIfOpen', "Controls whether an editor is revealed in any of the visible groups if opened. If disabled, an editor will prefer to open in the currently active editor group. If enabled, an already opened editor will be revealed instead of opened again in the currently active editor group. Note that there are some cases where this setting is ignored, such as when forcing an editor to open in a specific group or to the side of the currently active group."),348'default': false349},350'workbench.editor.mouseBackForwardToNavigate': {351'type': 'boolean',352'description': localize('mouseBackForwardToNavigate', "Enables the use of mouse buttons four and five for commands 'Go Back' and 'Go Forward'."),353'default': true354},355'workbench.editor.navigationScope': {356'type': 'string',357'enum': ['default', 'editorGroup', 'editor'],358'default': 'default',359'markdownDescription': localize('navigationScope', "Controls the scope of history navigation in editors for commands such as 'Go Back' and 'Go Forward'."),360'enumDescriptions': [361localize('workbench.editor.navigationScopeDefault', "Navigate across all opened editors and editor groups."),362localize('workbench.editor.navigationScopeEditorGroup', "Navigate only in editors of the active editor group."),363localize('workbench.editor.navigationScopeEditor', "Navigate only in the active editor.")364],365},366'workbench.editor.restoreViewState': {367'type': 'boolean',368'markdownDescription': localize('restoreViewState', "Restores the last editor view state (such as scroll position) when re-opening editors after they have been closed. Editor view state is stored per editor group and discarded when a group closes. Use the {0} setting to use the last known view state across all editor groups in case no previous view state was found for a editor group.", '`#workbench.editor.sharedViewState#`'),369'default': true,370'scope': ConfigurationScope.LANGUAGE_OVERRIDABLE371},372'workbench.editor.sharedViewState': {373'type': 'boolean',374'description': localize('sharedViewState', "Preserves the most recent editor view state (such as scroll position) across all editor groups and restores that if no specific editor view state is found for the editor group."),375'default': false376},377'workbench.editor.splitInGroupLayout': {378'type': 'string',379'enum': ['vertical', 'horizontal'],380'default': 'horizontal',381'markdownDescription': localize('splitInGroupLayout', "Controls the layout for when an editor is split in an editor group to be either vertical or horizontal."),382'enumDescriptions': [383localize('workbench.editor.splitInGroupLayoutVertical', "Editors are positioned from top to bottom."),384localize('workbench.editor.splitInGroupLayoutHorizontal', "Editors are positioned from left to right.")385]386},387'workbench.editor.centeredLayoutAutoResize': {388'type': 'boolean',389'default': true,390'description': localize('centeredLayoutAutoResize', "Controls if the centered layout should automatically resize to maximum width when more than one group is open. Once only one group is open it will resize back to the original centered width.")391},392'workbench.editor.centeredLayoutFixedWidth': {393'type': 'boolean',394'default': false,395'description': localize('centeredLayoutDynamicWidth', "Controls whether the centered layout tries to maintain constant width when the window is resized.")396},397'workbench.editor.doubleClickTabToToggleEditorGroupSizes': {398'type': 'string',399'enum': ['maximize', 'expand', 'off'],400'default': 'expand',401'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'doubleClickTabToToggleEditorGroupSizes' }, "Controls how the editor group is resized when double clicking on a tab. This value is ignored when {0} is not set to {1}.", '`#workbench.editor.showTabs#`', '`multiple`'),402'enumDescriptions': [403localize('workbench.editor.doubleClickTabToToggleEditorGroupSizes.maximize', "All other editor groups are hidden and the current editor group is maximized to take up the entire editor area."),404localize('workbench.editor.doubleClickTabToToggleEditorGroupSizes.expand', "The editor group takes as much space as possible by making all other editor groups as small as possible."),405localize('workbench.editor.doubleClickTabToToggleEditorGroupSizes.off', "No editor group is resized when double clicking on a tab.")406]407},408'workbench.editor.limit.enabled': {409'type': 'boolean',410'default': false,411'description': localize('limitEditorsEnablement', "Controls if the number of opened editors should be limited or not. When enabled, less recently used editors will close to make space for newly opening editors.")412},413'workbench.editor.limit.value': {414'type': 'number',415'default': 10,416'exclusiveMinimum': 0,417'markdownDescription': localize('limitEditorsMaximum', "Controls the maximum number of opened editors. Use the {0} setting to control this limit per editor group or across all groups.", '`#workbench.editor.limit.perEditorGroup#`')418},419'workbench.editor.limit.excludeDirty': {420'type': 'boolean',421'default': false,422'description': localize('limitEditorsExcludeDirty', "Controls if the maximum number of opened editors should exclude dirty editors for counting towards the configured limit.")423},424'workbench.editor.limit.perEditorGroup': {425'type': 'boolean',426'default': false,427'description': localize('perEditorGroup', "Controls if the limit of maximum opened editors should apply per editor group or across all editor groups.")428},429'workbench.localHistory.enabled': {430'type': 'boolean',431'default': true,432'description': localize('localHistoryEnabled', "Controls whether local file history is enabled. When enabled, the file contents of an editor that is saved will be stored to a backup location to be able to restore or review the contents later. Changing this setting has no effect on existing local file history entries."),433'scope': ConfigurationScope.RESOURCE434},435'workbench.localHistory.maxFileSize': {436'type': 'number',437'default': 256,438'minimum': 1,439'description': localize('localHistoryMaxFileSize', "Controls the maximum size of a file (in KB) to be considered for local file history. Files that are larger will not be added to the local file history. Changing this setting has no effect on existing local file history entries."),440'scope': ConfigurationScope.RESOURCE441},442'workbench.localHistory.maxFileEntries': {443'type': 'number',444'default': 50,445'minimum': 0,446'description': localize('localHistoryMaxFileEntries', "Controls the maximum number of local file history entries per file. When the number of local file history entries exceeds this number for a file, the oldest entries will be discarded."),447'scope': ConfigurationScope.RESOURCE448},449'workbench.localHistory.exclude': {450'type': 'object',451'patternProperties': {452'.*': { 'type': 'boolean' }453},454'markdownDescription': localize('exclude', "Configure paths or [glob patterns](https://aka.ms/vscode-glob-patterns) for excluding files from the local file history. Glob patterns are always evaluated relative to the path of the workspace folder unless they are absolute paths. Changing this setting has no effect on existing local file history entries."),455'scope': ConfigurationScope.RESOURCE456},457'workbench.localHistory.mergeWindow': {458'type': 'number',459'default': 10,460'minimum': 1,461'markdownDescription': localize('mergeWindow', "Configure an interval in seconds during which the last entry in local file history is replaced with the entry that is being added. This helps reduce the overall number of entries that are added, for example when auto save is enabled. This setting is only applied to entries that have the same source of origin. Changing this setting has no effect on existing local file history entries."),462'scope': ConfigurationScope.RESOURCE463},464'workbench.commandPalette.history': {465'type': 'number',466'description': localize('commandHistory', "Controls the number of recently used commands to keep in history for the command palette. Set to 0 to disable command history."),467'default': 50,468'minimum': 0469},470'workbench.commandPalette.preserveInput': {471'type': 'boolean',472'description': localize('preserveInput', "Controls whether the last typed input to the command palette should be restored when opening it the next time."),473'default': false474},475'workbench.commandPalette.experimental.suggestCommands': {476'type': 'boolean',477tags: ['experimental'],478'description': localize('suggestCommands', "Controls whether the command palette should have a list of commonly used commands."),479'default': false480},481'workbench.commandPalette.experimental.askChatLocation': {482'type': 'string',483tags: ['experimental'],484'description': localize('askChatLocation', "Controls where the command palette should ask chat questions."),485'default': 'chatView',486enum: ['chatView', 'quickChat'],487enumDescriptions: [488localize('askChatLocation.chatView', "Ask chat questions in the Chat view."),489localize('askChatLocation.quickChat', "Ask chat questions in Quick Chat.")490]491},492'workbench.commandPalette.experimental.enableNaturalLanguageSearch': {493'type': 'boolean',494tags: ['experimental'],495'description': localize('enableNaturalLanguageSearch', "Controls whether the command palette should include similar commands. You must have an extension installed that provides Natural Language support."),496'default': true497},498'workbench.quickOpen.closeOnFocusLost': {499'type': 'boolean',500'description': localize('closeOnFocusLost', "Controls whether Quick Open should close automatically once it loses focus."),501'default': true502},503'workbench.quickOpen.preserveInput': {504'type': 'boolean',505'description': localize('workbench.quickOpen.preserveInput', "Controls whether the last typed input to Quick Open should be restored when opening it the next time."),506'default': false507},508'workbench.settings.openDefaultSettings': {509'type': 'boolean',510'description': localize('openDefaultSettings', "Controls whether opening settings also opens an editor showing all default settings."),511'default': false512},513'workbench.settings.useSplitJSON': {514'type': 'boolean',515'markdownDescription': localize('useSplitJSON', "Controls whether to use the split JSON editor when editing settings as JSON."),516'default': false517},518'workbench.settings.openDefaultKeybindings': {519'type': 'boolean',520'description': localize('openDefaultKeybindings', "Controls whether opening keybinding settings also opens an editor showing all default keybindings."),521'default': false522},523'workbench.sideBar.location': {524'type': 'string',525'enum': ['left', 'right'],526'default': 'left',527'description': localize('sideBarLocation', "Controls the location of the primary side bar and activity bar. They can either show on the left or right of the workbench. The secondary side bar will show on the opposite side of the workbench.")528},529'workbench.panel.showLabels': {530'type': 'boolean',531'default': true,532'description': localize('panelShowLabels', "Controls whether activity items in the panel title are shown as label or icon."),533},534'workbench.panel.defaultLocation': {535'type': 'string',536'enum': ['left', 'bottom', 'top', 'right'],537'default': 'bottom',538'description': localize('panelDefaultLocation', "Controls the default location of the panel (Terminal, Debug Console, Output, Problems) in a new workspace. It can either show at the bottom, top, right, or left of the editor area."),539},540'workbench.panel.opensMaximized': {541'type': 'string',542'enum': ['always', 'never', 'preserve'],543'default': 'preserve',544'description': localize('panelOpensMaximized', "Controls whether the panel opens maximized. It can either always open maximized, never open maximized, or open to the last state it was in before being closed."),545'enumDescriptions': [546localize('workbench.panel.opensMaximized.always', "Always maximize the panel when opening it."),547localize('workbench.panel.opensMaximized.never', "Never maximize the panel when opening it."),548localize('workbench.panel.opensMaximized.preserve', "Open the panel to the state that it was in, before it was closed.")549]550},551'workbench.secondarySideBar.defaultVisibility': {552'type': 'string',553'enum': ['hidden', 'visibleInWorkspace', 'visible', 'maximizedInWorkspace', 'maximized'],554'default': 'visibleInWorkspace',555'description': localize('secondarySideBarDefaultVisibility', "Controls the default visibility of the secondary side bar in workspaces or empty windows that are opened for the first time."),556'enumDescriptions': [557localize('workbench.secondarySideBar.defaultVisibility.hidden', "The secondary side bar is hidden by default."),558localize('workbench.secondarySideBar.defaultVisibility.visibleInWorkspace', "The secondary side bar is visible by default if a workspace is opened."),559localize('workbench.secondarySideBar.defaultVisibility.visible', "The secondary side bar is visible by default."),560localize('workbench.secondarySideBar.defaultVisibility.maximizedInWorkspace', "The secondary side bar is visible and maximized by default if a workspace is opened."),561localize('workbench.secondarySideBar.defaultVisibility.maximized', "The secondary side bar is visible and maximized by default.")562]563},564'workbench.secondarySideBar.showLabels': {565'type': 'boolean',566'default': true,567'markdownDescription': localize('secondarySideBarShowLabels', "Controls whether activity items in the secondary side bar title are shown as label or icon. This setting only has an effect when {0} is not set to {1}.", '`#workbench.activityBar.location#`', '`top`'),568},569'workbench.statusBar.visible': {570'type': 'boolean',571'default': true,572'description': localize('statusBarVisibility', "Controls the visibility of the status bar at the bottom of the workbench.")573},574[LayoutSettings.ACTIVITY_BAR_LOCATION]: {575'type': 'string',576'enum': ['default', 'top', 'bottom', 'hidden'],577'default': 'default',578'markdownDescription': localize({ comment: ['This is the description for a setting'], key: 'activityBarLocation' }, "Controls the location of the Activity Bar relative to the Primary and Secondary Side Bars."),579'enumDescriptions': [580localize('workbench.activityBar.location.default', "Show the Activity Bar on the side of the Primary Side Bar and on top of the Secondary Side Bar."),581localize('workbench.activityBar.location.top', "Show the Activity Bar on top of the Primary and Secondary Side Bars."),582localize('workbench.activityBar.location.bottom', "Show the Activity Bar at the bottom of the Primary and Secondary Side Bars."),583localize('workbench.activityBar.location.hide', "Hide the Activity Bar in the Primary and Secondary Side Bars.")584],585},586'workbench.activityBar.iconClickBehavior': {587'type': 'string',588'enum': ['toggle', 'focus'],589'default': 'toggle',590'markdownDescription': localize({ comment: ['{0}, {1} will be a setting name rendered as a link'], key: 'activityBarIconClickBehavior' }, "Controls the behavior of clicking an Activity Bar icon in the workbench. This value is ignored when {0} is not set to {1}.", '`#workbench.activityBar.location#`', '`default`'),591'enumDescriptions': [592localize('workbench.activityBar.iconClickBehavior.toggle', "Hide the Primary Side Bar if the clicked item is already visible."),593localize('workbench.activityBar.iconClickBehavior.focus', "Focus the Primary Side Bar if the clicked item is already visible.")594]595},596'workbench.view.alwaysShowHeaderActions': {597'type': 'boolean',598'default': false,599'description': localize('viewVisibility', "Controls the visibility of view header actions. View header actions may either be always visible, or only visible when that view is focused or hovered over.")600},601'workbench.view.showQuietly': {602'type': 'object',603'description': localize('workbench.view.showQuietly', "If an extension requests a hidden view to be shown, display a clickable status bar indicator instead."),604'scope': ConfigurationScope.WINDOW,605'properties': {606'workbench.panel.output': {607'type': 'boolean',608'description': localize('workbench.panel.output', "Output view")609}610},611'additionalProperties': false612},613'workbench.fontAliasing': {614'type': 'string',615'enum': ['default', 'antialiased', 'none', 'auto'],616'default': 'default',617'description':618localize('fontAliasing', "Controls font aliasing method in the workbench."),619'enumDescriptions': [620localize('workbench.fontAliasing.default', "Sub-pixel font smoothing. On most non-retina displays this will give the sharpest text."),621localize('workbench.fontAliasing.antialiased', "Smooth the font on the level of the pixel, as opposed to the subpixel. Can make the font appear lighter overall."),622localize('workbench.fontAliasing.none', "Disables font smoothing. Text will show with jagged sharp edges."),623localize('workbench.fontAliasing.auto', "Applies `default` or `antialiased` automatically based on the DPI of displays.")624],625'included': isMacintosh626},627'workbench.settings.editor': {628'type': 'string',629'enum': ['ui', 'json'],630'enumDescriptions': [631localize('settings.editor.ui', "Use the settings UI editor."),632localize('settings.editor.json', "Use the JSON file editor."),633],634'description': localize('settings.editor.desc', "Determines which Settings editor to use by default."),635'default': 'ui',636'scope': ConfigurationScope.WINDOW637},638'workbench.settings.showAISearchToggle': {639'type': 'boolean',640'default': true,641'description': localize('settings.showAISearchToggle', "Controls whether the AI search results toggle is shown in the search bar in the Settings editor after doing a search and once AI search results are available."),642},643'workbench.hover.delay': {644'type': 'number',645'description': localize('workbench.hover.delay', "Controls the delay in milliseconds after which the hover is shown for workbench items (ex. some extension provided tree view items). Already visible items may require a refresh before reflecting this setting change."),646// Testing has indicated that on Windows and Linux 500 ms matches the native hovers most closely.647// On Mac, the delay is 1500.648'default': isMacintosh ? 1500 : 500,649'minimum': 0650},651'workbench.reduceMotion': {652type: 'string',653description: localize('workbench.reduceMotion', "Controls whether the workbench should render with fewer animations."),654'enumDescriptions': [655localize('workbench.reduceMotion.on', "Always render with reduced motion."),656localize('workbench.reduceMotion.off', "Do not render with reduced motion"),657localize('workbench.reduceMotion.auto', "Render with reduced motion based on OS configuration."),658],659default: 'auto',660tags: ['accessibility'],661enum: ['on', 'off', 'auto']662},663'workbench.navigationControl.enabled': {664'type': 'boolean',665'default': true,666'markdownDescription': isWeb ?667localize('navigationControlEnabledWeb', "Controls whether the navigation control in the title bar is shown.") :668localize({ key: 'navigationControlEnabled', comment: ['{0}, {1} is a placeholder for a setting identifier.'] }, "Controls whether the navigation control is shown in the custom title bar. This setting only has an effect when {0} is not set to {1}.", '`#window.customTitleBarVisibility#`', '`never`')669},670[LayoutSettings.LAYOUT_ACTIONS]: {671'type': 'boolean',672'default': true,673'markdownDescription': isWeb ?674localize('layoutControlEnabledWeb', "Controls whether the layout control in the title bar is shown.") :675localize({ key: 'layoutControlEnabled', comment: ['{0}, {1} is a placeholder for a setting identifier.'] }, "Controls whether the layout control is shown in the custom title bar. This setting only has an effect when {0} is not set to {1}.", '`#window.customTitleBarVisibility#`', '`never`')676},677'workbench.layoutControl.type': {678'type': 'string',679'enum': ['menu', 'toggles', 'both'],680'enumDescriptions': [681localize('layoutcontrol.type.menu', "Shows a single button with a dropdown of layout options."),682localize('layoutcontrol.type.toggles', "Shows several buttons for toggling the visibility of the panels and side bar."),683localize('layoutcontrol.type.both', "Shows both the dropdown and toggle buttons."),684],685'default': 'both',686'description': localize('layoutControlType', "Controls whether the layout control in the custom title bar is displayed as a single menu button or with multiple UI toggles."),687},688'workbench.tips.enabled': {689'type': 'boolean',690'default': true,691'description': localize('tips.enabled', "When enabled, will show the watermark tips when no editor is open.")692},693}694});695696// Window697698let windowTitleDescription = localize('windowTitle', "Controls the window title based on the current context such as the opened workspace or active editor. Variables are substituted based on the context:");699windowTitleDescription += '\n- ' + [700localize('activeEditorShort', "`${activeEditorShort}`: the file name (e.g. myFile.txt)."),701localize('activeEditorMedium', "`${activeEditorMedium}`: the path of the file relative to the workspace folder (e.g. myFolder/myFileFolder/myFile.txt)."),702localize('activeEditorLong', "`${activeEditorLong}`: the full path of the file (e.g. /Users/Development/myFolder/myFileFolder/myFile.txt)."),703localize('activeFolderShort', "`${activeFolderShort}`: the name of the folder the file is contained in (e.g. myFileFolder)."),704localize('activeFolderMedium', "`${activeFolderMedium}`: the path of the folder the file is contained in, relative to the workspace folder (e.g. myFolder/myFileFolder)."),705localize('activeFolderLong', "`${activeFolderLong}`: the full path of the folder the file is contained in (e.g. /Users/Development/myFolder/myFileFolder)."),706localize('folderName', "`${folderName}`: name of the workspace folder the file is contained in (e.g. myFolder)."),707localize('folderPath', "`${folderPath}`: file path of the workspace folder the file is contained in (e.g. /Users/Development/myFolder)."),708localize('rootName', "`${rootName}`: name of the workspace with optional remote name and workspace indicator if applicable (e.g. myFolder, myRemoteFolder [SSH] or myWorkspace (Workspace))."),709localize('rootNameShort', "`${rootNameShort}`: shortened name of the workspace without suffixes (e.g. myFolder, myRemoteFolder or myWorkspace)."),710localize('rootPath', "`${rootPath}`: file path of the opened workspace or folder (e.g. /Users/Development/myWorkspace)."),711localize('profileName', "`${profileName}`: name of the profile in which the workspace is opened (e.g. Data Science (Profile)). Ignored if default profile is used."),712localize('appName', "`${appName}`: e.g. VS Code."),713localize('remoteName', "`${remoteName}`: e.g. SSH"),714localize('dirty', "`${dirty}`: an indicator for when the active editor has unsaved changes."),715localize('focusedView', "`${focusedView}`: the name of the view that is currently focused."),716localize('activeRepositoryName', "`${activeRepositoryName}`: the name of the active repository (e.g. vscode)."),717localize('activeRepositoryBranchName', "`${activeRepositoryBranchName}`: the name of the active branch in the active repository (e.g. main)."),718localize('activeEditorState', "`${activeEditorState}`: provides information about the state of the active editor (e.g. modified). This will be appended by default when in screen reader mode with {0} enabled.", '`accessibility.windowTitleOptimized`'),719localize('separator', "`${separator}`: a conditional separator (\" - \") that only shows when surrounded by variables with values or static text.")720].join('\n- '); // intentionally concatenated to not produce a string that is too long for translations721722registry.registerConfiguration({723...windowConfigurationNodeBase,724'properties': {725'window.title': {726'type': 'string',727'default': defaultWindowTitle,728'markdownDescription': windowTitleDescription729},730'window.titleSeparator': {731'type': 'string',732'default': defaultWindowTitleSeparator,733'markdownDescription': localize("window.titleSeparator", "Separator used by {0}.", '`#window.title#`')734},735[LayoutSettings.COMMAND_CENTER]: {736type: 'boolean',737default: true,738markdownDescription: isWeb ?739localize('window.commandCenterWeb', "Show command launcher together with the window title.") :740localize({ key: 'window.commandCenter', comment: ['{0}, {1} is a placeholder for a setting identifier.'] }, "Show command launcher together with the window title. This setting only has an effect when {0} is not set to {1}.", '`#window.customTitleBarVisibility#`', '`never`')741},742'window.menuBarVisibility': {743'type': 'string',744'enum': ['classic', 'visible', 'toggle', 'hidden', 'compact'],745'markdownEnumDescriptions': [746localize('window.menuBarVisibility.classic', "Menu is displayed at the top of the window and only hidden in full screen mode."),747localize('window.menuBarVisibility.visible', "Menu is always visible at the top of the window even in full screen mode."),748isMacintosh ?749localize('window.menuBarVisibility.toggle.mac', "Menu is hidden but can be displayed at the top of the window by executing the `Focus Application Menu` command.") :750localize('window.menuBarVisibility.toggle', "Menu is hidden but can be displayed at the top of the window via the Alt key."),751localize('window.menuBarVisibility.hidden', "Menu is always hidden."),752isWeb ?753localize('window.menuBarVisibility.compact.web', "Menu is displayed as a compact button in the side bar.") :754localize({ key: 'window.menuBarVisibility.compact', comment: ['{0}, {1} is a placeholder for a setting identifier.'] }, "Menu is displayed as a compact button in the side bar. This value is ignored when {0} is {1} and {2} is either {3} or {4}.", '`#window.titleBarStyle#`', '`native`', '`#window.menuStyle#`', '`native`', '`inherit`')755],756'default': isWeb ? 'compact' : 'classic',757'scope': ConfigurationScope.APPLICATION,758'markdownDescription': isMacintosh ?759localize('menuBarVisibility.mac', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and executing `Focus Application Menu` will show it. A setting of 'compact' will move the menu into the side bar.") :760localize('menuBarVisibility', "Control the visibility of the menu bar. A setting of 'toggle' means that the menu bar is hidden and a single press of the Alt key will show it. A setting of 'compact' will move the menu into the side bar."),761'included': isWindows || isLinux || isWeb762},763'window.enableMenuBarMnemonics': {764'type': 'boolean',765'default': true,766'scope': ConfigurationScope.APPLICATION,767'description': localize('enableMenuBarMnemonics', "Controls whether the main menus can be opened via Alt-key shortcuts. Disabling mnemonics allows to bind these Alt-key shortcuts to editor commands instead."),768'included': isWindows || isLinux769},770'window.customMenuBarAltFocus': {771'type': 'boolean',772'default': true,773'scope': ConfigurationScope.APPLICATION,774'markdownDescription': localize('customMenuBarAltFocus', "Controls whether the menu bar will be focused by pressing the Alt-key. This setting has no effect on toggling the menu bar with the Alt-key."),775'included': isWindows || isLinux776},777'window.openFilesInNewWindow': {778'type': 'string',779'enum': ['on', 'off', 'default'],780'enumDescriptions': [781localize('window.openFilesInNewWindow.on', "Files will open in a new window."),782localize('window.openFilesInNewWindow.off', "Files will open in the window with the files' folder open or the last active window."),783isMacintosh ?784localize('window.openFilesInNewWindow.defaultMac', "Files will open in the window with the files' folder open or the last active window unless opened via the Dock or from Finder.") :785localize('window.openFilesInNewWindow.default', "Files will open in a new window unless picked from within the application (e.g. via the File menu).")786],787'default': 'off',788'scope': ConfigurationScope.APPLICATION,789'markdownDescription':790isMacintosh ?791localize('openFilesInNewWindowMac', "Controls whether files should open in a new window when using a command line or file dialog.\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).") :792localize('openFilesInNewWindow', "Controls whether files should open in a new window when using a command line or file dialog.\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).")793},794'window.openFoldersInNewWindow': {795'type': 'string',796'enum': ['on', 'off', 'default'],797'enumDescriptions': [798localize('window.openFoldersInNewWindow.on', "Folders will open in a new window."),799localize('window.openFoldersInNewWindow.off', "Folders will replace the last active window."),800localize('window.openFoldersInNewWindow.default', "Folders will open in a new window unless a folder is picked from within the application (e.g. via the File menu).")801],802'default': 'default',803'scope': ConfigurationScope.APPLICATION,804'markdownDescription': localize('openFoldersInNewWindow', "Controls whether folders should open in a new window or replace the last active window.\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).")805},806'window.confirmBeforeClose': {807'type': 'string',808'enum': ['always', 'keyboardOnly', 'never'],809'enumDescriptions': [810isWeb ?811localize('window.confirmBeforeClose.always.web', "Always try to ask for confirmation. Note that browsers may still decide to close a tab or window without confirmation.") :812localize('window.confirmBeforeClose.always', "Always ask for confirmation."),813isWeb ?814localize('window.confirmBeforeClose.keyboardOnly.web', "Only ask for confirmation if a keybinding was used to close the window. Note that detection may not be possible in some cases.") :815localize('window.confirmBeforeClose.keyboardOnly', "Only ask for confirmation if a keybinding was used."),816isWeb ?817localize('window.confirmBeforeClose.never.web', "Never explicitly ask for confirmation unless data loss is imminent.") :818localize('window.confirmBeforeClose.never', "Never explicitly ask for confirmation.")819],820'default': (isWeb && !isStandalone()) ? 'keyboardOnly' : 'never', // on by default in web, unless PWA, never on desktop821'markdownDescription': isWeb ?822localize('confirmBeforeCloseWeb', "Controls whether to show a confirmation dialog before closing the browser tab or window. Note that even if enabled, browsers may still decide to close a tab or window without confirmation and that this setting is only a hint that may not work in all cases.") :823localize('confirmBeforeClose', "Controls whether to show a confirmation dialog before closing a window or quitting the application."),824'scope': ConfigurationScope.APPLICATION825}826}827});828829// Dynamic Window Configuration830registerWorkbenchContribution2(DynamicWindowConfiguration.ID, DynamicWindowConfiguration, WorkbenchPhase.Eventually);831832// Problems833registry.registerConfiguration({834...problemsConfigurationNodeBase,835'properties': {836'problems.visibility': {837'type': 'boolean',838'default': true,839'description': localize('problems.visibility', "Controls whether the problems are visible throughout the editor and workbench."),840},841}842});843844// Zen Mode845registry.registerConfiguration({846'id': 'zenMode',847'order': 9,848'title': localize('zenModeConfigurationTitle', "Zen Mode"),849'type': 'object',850'properties': {851'zenMode.fullScreen': {852'type': 'boolean',853'default': true,854'description': localize('zenMode.fullScreen', "Controls whether turning on Zen Mode also puts the workbench into full screen mode.")855},856'zenMode.centerLayout': {857'type': 'boolean',858'default': true,859'description': localize('zenMode.centerLayout', "Controls whether turning on Zen Mode also centers the layout.")860},861'zenMode.showTabs': {862'type': 'string',863'enum': ['multiple', 'single', 'none'],864'description': localize('zenMode.showTabs', "Controls whether turning on Zen Mode should show multiple editor tabs, a single editor tab, or hide the editor title area completely."),865'enumDescriptions': [866localize('zenMode.showTabs.multiple', "Each editor is displayed as a tab in the editor title area."),867localize('zenMode.showTabs.single', "The active editor is displayed as a single large tab in the editor title area."),868localize('zenMode.showTabs.none', "The editor title area is not displayed."),869],870'default': 'multiple'871},872'zenMode.hideStatusBar': {873'type': 'boolean',874'default': true,875'description': localize('zenMode.hideStatusBar', "Controls whether turning on Zen Mode also hides the status bar at the bottom of the workbench.")876},877'zenMode.hideActivityBar': {878'type': 'boolean',879'default': true,880'description': localize('zenMode.hideActivityBar', "Controls whether turning on Zen Mode also hides the activity bar either at the left or right of the workbench.")881},882'zenMode.hideLineNumbers': {883'type': 'boolean',884'default': true,885'description': localize('zenMode.hideLineNumbers', "Controls whether turning on Zen Mode also hides the editor line numbers.")886},887'zenMode.restore': {888'type': 'boolean',889'default': true,890'description': localize('zenMode.restore', "Controls whether a window should restore to Zen Mode if it was exited in Zen Mode.")891},892'zenMode.silentNotifications': {893'type': 'boolean',894'default': true,895'description': localize('zenMode.silentNotifications', "Controls whether notifications do not disturb mode should be enabled while in Zen Mode. If true, only error notifications will pop out.")896}897}898});899})();900901Registry.as<IConfigurationMigrationRegistry>(Extensions.ConfigurationMigration)902.registerConfigurationMigrations([{903key: 'workbench.activityBar.visible', migrateFn: (value: any) => {904const result: ConfigurationKeyValuePairs = [];905if (value !== undefined) {906result.push(['workbench.activityBar.visible', { value: undefined }]);907}908if (value === false) {909result.push([LayoutSettings.ACTIVITY_BAR_LOCATION, { value: ActivityBarPosition.HIDDEN }]);910}911return result;912}913}]);914915Registry.as<IConfigurationMigrationRegistry>(Extensions.ConfigurationMigration)916.registerConfigurationMigrations([{917key: LayoutSettings.ACTIVITY_BAR_LOCATION, migrateFn: (value: any) => {918const results: ConfigurationKeyValuePairs = [];919if (value === 'side') {920results.push([LayoutSettings.ACTIVITY_BAR_LOCATION, { value: ActivityBarPosition.DEFAULT }]);921}922return results;923}924}]);925926Registry.as<IConfigurationMigrationRegistry>(Extensions.ConfigurationMigration)927.registerConfigurationMigrations([{928key: 'workbench.editor.doubleClickTabToToggleEditorGroupSizes', migrateFn: (value: any) => {929const results: ConfigurationKeyValuePairs = [];930if (typeof value === 'boolean') {931value = value ? 'expand' : 'off';932results.push(['workbench.editor.doubleClickTabToToggleEditorGroupSizes', { value }]);933}934return results;935}936}, {937key: LayoutSettings.EDITOR_TABS_MODE, migrateFn: (value: any) => {938const results: ConfigurationKeyValuePairs = [];939if (typeof value === 'boolean') {940value = value ? EditorTabsMode.MULTIPLE : EditorTabsMode.SINGLE;941results.push([LayoutSettings.EDITOR_TABS_MODE, { value }]);942}943return results;944}945}, {946key: 'workbench.editor.tabCloseButton', migrateFn: (value: any) => {947const result: ConfigurationKeyValuePairs = [];948if (value === 'left' || value === 'right') {949result.push(['workbench.editor.tabActionLocation', { value }]);950} else if (value === 'off') {951result.push(['workbench.editor.tabActionCloseVisibility', { value: false }]);952}953return result;954}955}, {956key: 'zenMode.hideTabs', migrateFn: (value: any) => {957const result: ConfigurationKeyValuePairs = [['zenMode.hideTabs', { value: undefined }]];958if (value === true) {959result.push(['zenMode.showTabs', { value: 'single' }]);960}961return result;962}963}]);964965966