settingsLayout.ts 4.9 KB
Newer Older
R
Rob Lourens 已提交
1
/*---------------------------------------------------------------------------------------------
2 3 4
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/
R
Rob Lourens 已提交
5

R
Rob Lourens 已提交
6
import { localize } from 'vs/nls';
R
Rob Lourens 已提交
7 8 9 10 11 12 13 14 15
import { ISetting } from 'vs/workbench/services/preferences/common/preferences';

export interface ITOCEntry {
	id: string;
	label: string;

	children?: ITOCEntry[];
	settings?: (string | ISetting)[];
}
R
Rob Lourens 已提交
16

17 18
export const commonlyUsedData: ITOCEntry = {
	id: 'commonlyUsed',
R
Rob Lourens 已提交
19
	label: localize('commonlyUsed', "Commonly Used"),
20 21 22
	settings: ['files.autoSave', 'editor.fontSize', 'editor.fontFamily', 'editor.tabSize', 'editor.renderWhitespace', 'editor.cursorStyle', 'editor.multiCursorModifier', 'editor.insertSpaces', 'editor.wordWrap', 'files.exclude', 'files.associations']
};

23 24 25 26
export const tocData: ITOCEntry = {
	id: 'root',
	label: 'root',
	children: [
R
Rob Lourens 已提交
27
		{
28
			id: 'editor',
R
Rob Lourens 已提交
29
			label: localize('textEditor', "Text Editor"),
30
			settings: ['editor.*'],
31 32 33
			children: [
				{
					id: 'editor/cursor',
R
Rob Lourens 已提交
34
					label: localize('cursor', "Cursor"),
35 36 37 38
					settings: ['editor.cursor*']
				},
				{
					id: 'editor/find',
R
Rob Lourens 已提交
39
					label: localize('find', "Find"),
40 41 42 43
					settings: ['editor.find.*']
				},
				{
					id: 'editor/font',
R
Rob Lourens 已提交
44
					label: localize('font', "Font"),
45 46 47 48
					settings: ['editor.font*']
				},
				{
					id: 'editor/format',
49
					label: localize('formatting', "Formatting"),
50 51 52
					settings: ['editor.format*']
				},
				{
53
					id: 'editor/diffEditor',
R
Rob Lourens 已提交
54
					label: localize('diffEditor', "Diff Editor"),
55 56 57 58
					settings: ['diffEditor.*']
				},
				{
					id: 'editor/minimap',
R
Rob Lourens 已提交
59
					label: localize('minimap', "Minimap"),
60 61 62 63
					settings: ['editor.minimap.*']
				},
				{
					id: 'editor/suggestions',
R
Rob Lourens 已提交
64
					label: localize('suggestions', "Suggestions"),
65
					settings: ['editor.*suggest*']
66 67 68
				},
				{
					id: 'editor/files',
R
Rob Lourens 已提交
69
					label: localize('files', "Files"),
70 71 72 73 74 75
					settings: ['files.*']
				}
			]
		},
		{
			id: 'workbench',
R
Rob Lourens 已提交
76
			label: localize('workbench', "Workbench"),
77
			settings: ['workbench.*'],
78 79 80
			children: [
				{
					id: 'workbench/appearance',
R
Rob Lourens 已提交
81
					label: localize('appearance', "Appearance"),
82 83
					settings: ['workbench.activityBar.*', 'workbench.*color*', 'workbench.fontAliasing', 'workbench.iconTheme', 'workbench.sidebar.location', 'workbench.*.visible', 'workbench.tips.enabled', 'workbench.tree.*', 'workbench.view.*']
				},
84 85 86 87 88
				{
					id: 'workbench/breadcrumbs',
					label: localize('breadcrumbs', "Breadcrumbs"),
					settings: ['breadcrumbs.*']
				},
89 90
				{
					id: 'workbench/editor',
R
Rob Lourens 已提交
91
					label: localize('editorManagement', "Editor Management"),
92 93
					settings: ['workbench.editor.*']
				},
94 95 96 97 98
				{
					id: 'workbench/settings',
					label: localize('settings', "Settings Editor"),
					settings: ['workbench.settings.*']
				},
99 100
				{
					id: 'workbench/zenmode',
R
Rob Lourens 已提交
101
					label: localize('zenMode', "Zen Mode"),
102 103 104 105 106 107
					settings: ['zenmode.*']
				}
			]
		},
		{
			id: 'window',
R
Rob Lourens 已提交
108
			label: localize('window', "Window"),
109
			settings: ['window.*'],
110 111 112
			children: [
				{
					id: 'window/newWindow',
R
Rob Lourens 已提交
113
					label: localize('newWindow', "New Window"),
114 115 116 117 118 119
					settings: ['window.*newwindow*']
				}
			]
		},
		{
			id: 'features',
R
Rob Lourens 已提交
120
			label: localize('features', "Features"),
121 122 123
			children: [
				{
					id: 'features/explorer',
124
					label: localize('fileExplorer', "Explorer"),
125 126 127 128
					settings: ['explorer.*', 'outline.*']
				},
				{
					id: 'features/search',
R
Rob Lourens 已提交
129
					label: localize('search', "Search"),
130
					settings: ['search.*', 'searchRipgrep.*']
131 132 133 134
				}
				,
				{
					id: 'features/debug',
R
Rob Lourens 已提交
135
					label: localize('debug', "Debug"),
136 137 138 139
					settings: ['debug.*', 'launch']
				},
				{
					id: 'features/scm',
R
Rob Lourens 已提交
140
					label: localize('scm', "SCM"),
141 142 143 144
					settings: ['scm.*']
				},
				{
					id: 'features/extensions',
R
Rob Lourens 已提交
145
					label: localize('extensionViewlet', "Extension Viewlet"),
146 147 148 149
					settings: ['extensions.*']
				},
				{
					id: 'features/terminal',
R
Rob Lourens 已提交
150
					label: localize('terminal', "Terminal"),
151 152 153 154
					settings: ['terminal.*']
				},
				{
					id: 'features/problems',
R
Rob Lourens 已提交
155
					label: localize('problems', "Problems"),
156 157 158 159 160 161
					settings: ['problems.*']
				}
			]
		},
		{
			id: 'application',
R
Rob Lourens 已提交
162
			label: localize('application', "Application"),
163 164 165
			children: [
				{
					id: 'application/http',
R
Rob Lourens 已提交
166
					label: localize('proxy', "Proxy"),
167 168 169 170
					settings: ['http.*']
				},
				{
					id: 'application/keyboard',
R
Rob Lourens 已提交
171
					label: localize('keyboard', "Keyboard"),
172 173 174 175
					settings: ['keyboard.*']
				},
				{
					id: 'application/update',
R
Rob Lourens 已提交
176
					label: localize('update', "Update"),
177 178 179 180
					settings: ['update.*']
				},
				{
					id: 'application/telemetry',
R
Rob Lourens 已提交
181
					label: localize('telemetry', "Telemetry"),
182 183 184 185 186
					settings: ['telemetry.*']
				}
			]
		}
	]
R
Rob Lourens 已提交
187
};
188 189 190 191 192 193 194 195 196 197 198 199

export const knownAcronyms = new Set();
[
	'css',
	'html',
	'scss',
	'less',
	'json',
	'js',
	'ts',
	'ie',
	'id',
200
	'php',
201
].forEach(str => knownAcronyms.add(str));