Path: blob/main/src/vs/workbench/contrib/preferences/browser/settingsLayout.ts
3296 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 { isWeb, isWindows } from '../../../../base/common/platform.js';6import { localize } from '../../../../nls.js';7import { ExtensionToggleData } from '../common/preferences.js';89export interface ITOCEntry<T> {10id: string;11label: string;12order?: number;13children?: ITOCEntry<T>[];14settings?: Array<T>;15hide?: boolean;16}1718const defaultCommonlyUsedSettings: string[] = [19'editor.fontSize',20'editor.formatOnSave',21'files.autoSave',22'editor.defaultFormatter',23'editor.fontFamily',24'editor.wordWrap',25'files.exclude',26'workbench.colorTheme',27'editor.tabSize',28'editor.mouseWheelZoom',29'editor.formatOnPaste'30];3132export function getCommonlyUsedData(toggleData: ExtensionToggleData | undefined): ITOCEntry<string> {33return {34id: 'commonlyUsed',35label: localize('commonlyUsed', "Commonly Used"),36settings: toggleData?.commonlyUsed ?? defaultCommonlyUsedSettings37};38}3940export const tocData: ITOCEntry<string> = {41id: 'root',42label: 'root',43children: [44{45id: 'editor',46label: localize('textEditor', "Text Editor"),47settings: ['editor.*'],48children: [49{50id: 'editor/cursor',51label: localize('cursor', "Cursor"),52settings: ['editor.cursor*']53},54{55id: 'editor/find',56label: localize('find', "Find"),57settings: ['editor.find.*']58},59{60id: 'editor/font',61label: localize('font', "Font"),62settings: ['editor.font*']63},64{65id: 'editor/format',66label: localize('formatting', "Formatting"),67settings: ['editor.format*']68},69{70id: 'editor/diffEditor',71label: localize('diffEditor', "Diff Editor"),72settings: ['diffEditor.*']73},74{75id: 'editor/multiDiffEditor',76label: localize('multiDiffEditor', "Multi-File Diff Editor"),77settings: ['multiDiffEditor.*']78},79{80id: 'editor/minimap',81label: localize('minimap', "Minimap"),82settings: ['editor.minimap.*']83},84{85id: 'editor/suggestions',86label: localize('suggestions', "Suggestions"),87settings: ['editor.*suggest*']88},89{90id: 'editor/files',91label: localize('files', "Files"),92settings: ['files.*']93}94]95},96{97id: 'workbench',98label: localize('workbench', "Workbench"),99settings: ['workbench.*'],100children: [101{102id: 'workbench/appearance',103label: localize('appearance', "Appearance"),104settings: ['workbench.activityBar.*', 'workbench.*color*', 'workbench.fontAliasing', 'workbench.iconTheme', 'workbench.sidebar.location', 'workbench.*.visible', 'workbench.tips.enabled', 'workbench.tree.*', 'workbench.view.*']105},106{107id: 'workbench/breadcrumbs',108label: localize('breadcrumbs', "Breadcrumbs"),109settings: ['breadcrumbs.*']110},111{112id: 'workbench/editor',113label: localize('editorManagement', "Editor Management"),114settings: ['workbench.editor.*']115},116{117id: 'workbench/settings',118label: localize('settings', "Settings Editor"),119settings: ['workbench.settings.*']120},121{122id: 'workbench/zenmode',123label: localize('zenMode', "Zen Mode"),124settings: ['zenmode.*']125},126{127id: 'workbench/screencastmode',128label: localize('screencastMode', "Screencast Mode"),129settings: ['screencastMode.*']130}131]132},133{134id: 'window',135label: localize('window', "Window"),136settings: ['window.*'],137children: [138{139id: 'window/newWindow',140label: localize('newWindow', "New Window"),141settings: ['window.*newwindow*']142}143]144},145{146id: 'features',147label: localize('features', "Features"),148children: [149{150id: 'features/accessibilitySignals',151label: localize('accessibility.signals', 'Accessibility Signals'),152settings: ['accessibility.signal*']153},154{155id: 'features/accessibility',156label: localize('accessibility', "Accessibility"),157settings: ['accessibility.*']158},159{160id: 'features/explorer',161label: localize('fileExplorer', "Explorer"),162settings: ['explorer.*', 'outline.*']163},164{165id: 'features/search',166label: localize('search', "Search"),167settings: ['search.*']168},169{170id: 'features/debug',171label: localize('debug', "Debug"),172settings: ['debug.*', 'launch']173},174{175id: 'features/testing',176label: localize('testing', "Testing"),177settings: ['testing.*']178},179{180id: 'features/scm',181label: localize('scm', "Source Control"),182settings: ['scm.*']183},184{185id: 'features/extensions',186label: localize('extensions', "Extensions"),187settings: ['extensions.*']188},189{190id: 'features/terminal',191label: localize('terminal', "Terminal"),192settings: ['terminal.*']193},194{195id: 'features/task',196label: localize('task', "Task"),197settings: ['task.*']198},199{200id: 'features/problems',201label: localize('problems', "Problems"),202settings: ['problems.*']203},204{205id: 'features/output',206label: localize('output', "Output"),207settings: ['output.*']208},209{210id: 'features/comments',211label: localize('comments', "Comments"),212settings: ['comments.*']213},214{215id: 'features/remote',216label: localize('remote', "Remote"),217settings: ['remote.*']218},219{220id: 'features/timeline',221label: localize('timeline', "Timeline"),222settings: ['timeline.*']223},224{225id: 'features/notebook',226label: localize('notebook', 'Notebook'),227settings: ['notebook.*', 'interactiveWindow.*']228},229{230id: 'features/mergeEditor',231label: localize('mergeEditor', 'Merge Editor'),232settings: ['mergeEditor.*']233},234{235id: 'features/chat',236label: localize('chat', 'Chat'),237settings: ['chat.*', 'inlineChat.*', 'mcp']238},239{240id: 'features/issueReporter',241label: localize('issueReporter', 'Issue Reporter'),242settings: ['issueReporter.*'],243hide: !isWeb244}245]246},247{248id: 'application',249label: localize('application', "Application"),250children: [251{252id: 'application/http',253label: localize('proxy', "Proxy"),254settings: ['http.*']255},256{257id: 'application/keyboard',258label: localize('keyboard', "Keyboard"),259settings: ['keyboard.*']260},261{262id: 'application/update',263label: localize('update', "Update"),264settings: ['update.*']265},266{267id: 'application/telemetry',268label: localize('telemetry', "Telemetry"),269settings: ['telemetry.*']270},271{272id: 'application/settingsSync',273label: localize('settingsSync', "Settings Sync"),274settings: ['settingsSync.*']275},276{277id: 'application/experimental',278label: localize('experimental', "Experimental"),279settings: ['application.experimental.*']280},281{282id: 'application/other',283label: localize('other', "Other"),284settings: ['application.*'],285hide: isWindows286}287]288},289{290id: 'security',291label: localize('security', "Security"),292settings: ['security.*'],293children: [294{295id: 'security/workspace',296label: localize('workspace', "Workspace"),297settings: ['security.workspace.*']298}299]300}301]302};303304305