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