@codingame/monaco-vscode-api 1.78.3-next.1 → 1.78.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api2.js +4 -69
- package/dist/bat.js +9 -0
- package/dist/clojure.js +8 -0
- package/dist/coffeescript.js +9 -2
- package/dist/coffeescript2.js +2 -0
- package/dist/cpp.js +16 -2
- package/dist/cpp2.js +2 -0
- package/dist/csharp.js +9 -2
- package/dist/csharp2.js +2 -0
- package/dist/css.js +8 -0
- package/dist/dart.js +8 -0
- package/dist/default-extensions/bat.js +5 -3
- package/dist/default-extensions/clojure.js +6 -4
- package/dist/default-extensions/coffeescript.js +5 -3
- package/dist/default-extensions/cpp.js +7 -3
- package/dist/default-extensions/csharp.js +5 -3
- package/dist/default-extensions/css.js +6 -4
- package/dist/default-extensions/dart.js +6 -4
- package/dist/default-extensions/diff.js +6 -4
- package/dist/default-extensions/docker.js +6 -4
- package/dist/default-extensions/fsharp.js +5 -3
- package/dist/default-extensions/go.js +6 -4
- package/dist/default-extensions/groovy.js +5 -3
- package/dist/default-extensions/handlebars.js +6 -4
- package/dist/default-extensions/hlsl.js +6 -4
- package/dist/default-extensions/html.js +5 -3
- package/dist/default-extensions/ini.js +7 -4
- package/dist/default-extensions/java.js +5 -3
- package/dist/default-extensions/javascript.js +8 -4
- package/dist/default-extensions/json.js +7 -4
- package/dist/default-extensions/julia.js +6 -4
- package/dist/default-extensions/latex.js +5 -6
- package/dist/default-extensions/less.js +6 -4
- package/dist/default-extensions/log.js +4 -2
- package/dist/default-extensions/lua.js +6 -4
- package/dist/default-extensions/make.js +6 -4
- package/dist/default-extensions/markdown-basics.js +5 -3
- package/dist/default-extensions/objective-c.js +7 -4
- package/dist/default-extensions/perl.js +7 -5
- package/dist/default-extensions/php.js +5 -3
- package/dist/default-extensions/powershell.js +6 -4
- package/dist/default-extensions/pug.js +6 -4
- package/dist/default-extensions/python.js +6 -4
- package/dist/default-extensions/r.js +6 -4
- package/dist/default-extensions/razor.js +6 -4
- package/dist/default-extensions/ruby.js +6 -4
- package/dist/default-extensions/rust.js +6 -4
- package/dist/default-extensions/scss.js +6 -4
- package/dist/default-extensions/shaderlab.js +6 -4
- package/dist/default-extensions/shellscript.js +6 -4
- package/dist/default-extensions/sql.js +6 -4
- package/dist/default-extensions/swift.js +5 -3
- package/dist/default-extensions/theme-abyss.js +4 -2
- package/dist/default-extensions/theme-defaults.js +4 -2
- package/dist/default-extensions/theme-kimbie-dark.js +4 -2
- package/dist/default-extensions/theme-monokai-dimmed.js +4 -2
- package/dist/default-extensions/theme-monokai.js +4 -2
- package/dist/default-extensions/theme-quietlight.js +4 -2
- package/dist/default-extensions/theme-red.js +4 -2
- package/dist/default-extensions/theme-seti.js +4 -2
- package/dist/default-extensions/theme-solarized-dark.js +4 -2
- package/dist/default-extensions/theme-solarized-light.js +4 -2
- package/dist/default-extensions/theme-tomorrow-night-blue.js +4 -2
- package/dist/default-extensions/typescript-basics.js +7 -3
- package/dist/default-extensions/vb.js +5 -3
- package/dist/default-extensions/xml.js +7 -5
- package/dist/default-extensions/yaml.js +7 -3
- package/dist/diff.js +8 -0
- package/dist/docker.js +8 -0
- package/dist/extensions.d.ts +2 -9
- package/dist/fsharp.js +9 -2
- package/dist/fsharp2.js +2 -0
- package/dist/go.js +8 -0
- package/dist/groovy.js +9 -2
- package/dist/groovy2.js +2 -0
- package/dist/handlebars.js +8 -0
- package/dist/hlsl.js +8 -0
- package/dist/html.js +10 -2
- package/dist/html2.js +2 -0
- package/dist/ini.js +10 -0
- package/dist/java.js +9 -2
- package/dist/java2.js +2 -0
- package/dist/javascript.js +14 -2
- package/dist/javascript2.js +2 -0
- package/dist/json.js +10 -0
- package/dist/julia.js +8 -0
- package/dist/latex.js +11 -0
- package/dist/less.js +8 -0
- package/dist/log.js +7 -0
- package/dist/lua.js +8 -0
- package/dist/make.js +8 -0
- package/dist/markdown-basics.js +9 -0
- package/dist/modelEditor.d.ts +1398 -136
- package/dist/monaco.d.ts +5 -9
- package/dist/monaco.js +44 -370
- package/dist/objective-c.js +10 -0
- package/dist/perl.js +10 -0
- package/dist/php.js +10 -2
- package/dist/php2.js +2 -0
- package/dist/polyfill.js +10 -29
- package/dist/powershell.js +8 -0
- package/dist/pug.js +8 -0
- package/dist/python.js +9 -0
- package/dist/r.js +8 -0
- package/dist/razor.js +8 -0
- package/dist/rollup-vsix-plugin.d.ts +2 -4
- package/dist/rollup-vsix-plugin.js +27 -903
- package/dist/ruby.js +8 -0
- package/dist/rust.js +8 -0
- package/dist/scss.js +9 -0
- package/dist/shaderlab.js +8 -0
- package/dist/shellscript.js +8 -0
- package/dist/snippetsService.js +1 -1
- package/dist/sql.js +8 -0
- package/dist/swift.js +9 -2
- package/dist/swift2.js +2 -0
- package/dist/theme-abyss.js +7 -0
- package/dist/theme-defaults.js +15 -0
- package/dist/theme-kimbie-dark.js +7 -0
- package/dist/theme-monokai-dimmed.js +7 -0
- package/dist/theme-monokai.js +7 -0
- package/dist/theme-quietlight.js +7 -0
- package/dist/theme-red.js +7 -0
- package/dist/theme-seti.js +7 -0
- package/dist/theme-solarized-dark.js +7 -0
- package/dist/theme-solarized-light.js +7 -0
- package/dist/theme-tomorrow-night-blue.js +7 -0
- package/dist/typescript-basics.js +14 -0
- package/dist/vb.js +9 -2
- package/dist/vb2.js +2 -0
- package/dist/webpack-loader.cjs +2 -1
- package/dist/xml.js +10 -0
- package/dist/yaml.js +10 -0
- package/package.json +3 -3
- package/dist/default-extensions/typescript-language-features.js +0 -7
- package/dist/latex-cpp-embedded-language-configuration.js +0 -2
- package/dist/latex-language-configuration.js +0 -2
- package/dist/markdown-latex-combined-language-configuration.js +0 -2
package/dist/monaco.d.ts
CHANGED
|
@@ -5477,14 +5477,6 @@ interface IResolvedTextFileEditorModel extends ITextFileEditorModel {
|
|
|
5477
5477
|
createSnapshot(): ITextSnapshot;
|
|
5478
5478
|
}
|
|
5479
5479
|
|
|
5480
|
-
type Unpacked<T> = T extends (infer U)[] ? U : T;
|
|
5481
|
-
type JsonSchema = Unpacked<NonNullable<monaco.languages.json.DiagnosticsOptions['schemas']>>;
|
|
5482
|
-
declare function registerJsonSchema(schema: JsonSchema): monaco.IDisposable;
|
|
5483
|
-
/**
|
|
5484
|
-
* Synchronize registered json schema on the monaco json worker
|
|
5485
|
-
*/
|
|
5486
|
-
declare function synchronizeJsonSchemas(): monaco.IDisposable;
|
|
5487
|
-
|
|
5488
5480
|
declare function writeFile(uri: URI, content: string): Promise<void>;
|
|
5489
5481
|
declare function deleteFile(uri: URI, options?: Partial<IFileDeleteOptions>): Promise<void>;
|
|
5490
5482
|
declare function createModelReference(resource: URI, content?: string): Promise<IReference<ITextFileEditorModel>>;
|
|
@@ -5494,5 +5486,9 @@ declare const Extensions: {
|
|
|
5494
5486
|
Configuration: string;
|
|
5495
5487
|
JSONContribution: string;
|
|
5496
5488
|
};
|
|
5489
|
+
/**
|
|
5490
|
+
* Synchronize registered json schema on the monaco json worker
|
|
5491
|
+
*/
|
|
5492
|
+
declare function synchronizeJsonSchemas(): monaco.IDisposable;
|
|
5497
5493
|
|
|
5498
|
-
export { CommandsRegistry, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema,
|
|
5494
|
+
export { CommandsRegistry, ContextKeyExprType, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry, createConfiguredDiffEditor, createConfiguredEditor, createModelReference, deleteFile, errorHandler, registerColor, setCollapseStateForMatchingLines, synchronizeJsonSchemas, writeFile };
|
package/dist/monaco.js
CHANGED
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { __decorate, __param, IFileService, distinct, IUserDataProfilesService } from './polyfill.js';
|
|
2
|
+
export { ContextKeyExprType } from './polyfill.js';
|
|
3
|
+
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
3
4
|
export { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
|
-
import { ExtensionsRegistry } from './extensionsRegistry.js';
|
|
5
|
-
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
6
|
-
import { isString, isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
7
|
-
import { joinPath, isEqualOrParent } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
8
|
-
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
9
|
-
export { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
10
|
-
import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
|
|
11
5
|
import { createInjectedClass } from './injection.js';
|
|
12
|
-
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
13
|
-
import { Disposable, extensions } from './api2.js';
|
|
14
|
-
import { Extensions as Extensions$3 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
15
|
-
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
16
|
-
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
17
6
|
import { editorOptionsRegistry } from 'monaco-editor/esm/vs/editor/common/config/editorOptions.js';
|
|
18
7
|
import { equals } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
8
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
9
|
+
export { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
10
|
+
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
19
11
|
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
|
|
20
12
|
import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js';
|
|
21
|
-
import { Extensions as Extensions$
|
|
13
|
+
import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
14
|
+
import { Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
22
15
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
23
16
|
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
24
17
|
import { StandaloneDiffEditor, StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
|
|
18
|
+
import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
25
19
|
import { deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
26
20
|
export { errorHandler } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
27
21
|
export { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
@@ -117,358 +111,6 @@ class EditorOptionsUtil {
|
|
|
117
111
|
return changed;
|
|
118
112
|
}
|
|
119
113
|
}
|
|
120
|
-
const configurationExtPoint$1 = ( (ExtensionsRegistry.registerExtensionPoint({
|
|
121
|
-
extensionPoint: 'jsonValidation',
|
|
122
|
-
defaultExtensionKind: ['workspace', 'web'],
|
|
123
|
-
jsonSchema: {
|
|
124
|
-
description: ( (localize('contributes.jsonValidation', 'Contributes json schema configuration.'))),
|
|
125
|
-
type: 'array',
|
|
126
|
-
defaultSnippets: [{ body: [{ fileMatch: '${1:file.json}', url: '${2:url}' }] }],
|
|
127
|
-
items: {
|
|
128
|
-
type: 'object',
|
|
129
|
-
defaultSnippets: [{ body: { fileMatch: '${1:file.json}', url: '${2:url}' } }],
|
|
130
|
-
properties: {
|
|
131
|
-
fileMatch: {
|
|
132
|
-
type: ['string', 'array'],
|
|
133
|
-
description: ( (localize(
|
|
134
|
-
'contributes.jsonValidation.fileMatch',
|
|
135
|
-
'The file pattern (or an array of patterns) to match, for example "package.json" or "*.launch". Exclusion patterns start with \'!\''
|
|
136
|
-
))),
|
|
137
|
-
items: {
|
|
138
|
-
type: ['string']
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
url: {
|
|
142
|
-
description: ( (localize(
|
|
143
|
-
'contributes.jsonValidation.url',
|
|
144
|
-
'A schema URL (\'http:\', \'https:\') or relative path to the extension folder (\'./\').'
|
|
145
|
-
))),
|
|
146
|
-
type: 'string'
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
})));
|
|
152
|
-
class JSONValidationExtensionPoint {
|
|
153
|
-
constructor() {
|
|
154
|
-
configurationExtPoint$1.setHandler((extensions) => {
|
|
155
|
-
for (const extension of extensions) {
|
|
156
|
-
const extensionValue = extension.value;
|
|
157
|
-
const collector = extension.collector;
|
|
158
|
-
const extensionLocation = extension.description.extensionLocation;
|
|
159
|
-
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
160
|
-
collector.error(( (localize('invalid.jsonValidation', "'configuration.jsonValidation' must be a array"))));
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
extensionValue.forEach(extension => {
|
|
164
|
-
if (!isString(extension.fileMatch) && !(Array.isArray(extension.fileMatch) && extension.fileMatch.every(isString))) {
|
|
165
|
-
collector.error(( (localize(
|
|
166
|
-
'invalid.fileMatch',
|
|
167
|
-
"'configuration.jsonValidation.fileMatch' must be defined as a string or an array of strings."
|
|
168
|
-
))));
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
const uri = extension.url;
|
|
172
|
-
if (!isString(uri)) {
|
|
173
|
-
collector.error(( (localize(
|
|
174
|
-
'invalid.url',
|
|
175
|
-
"'configuration.jsonValidation.url' must be a URL or relative path"
|
|
176
|
-
))));
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
if (uri.startsWith('./')) {
|
|
180
|
-
try {
|
|
181
|
-
const colorThemeLocation = joinPath(extensionLocation, uri);
|
|
182
|
-
if (!isEqualOrParent(colorThemeLocation, extensionLocation)) {
|
|
183
|
-
collector.warn(( (localize(
|
|
184
|
-
'invalid.path.1',
|
|
185
|
-
"Expected `contributes.{0}.url` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
|
|
186
|
-
configurationExtPoint$1.name,
|
|
187
|
-
(colorThemeLocation.toString()),
|
|
188
|
-
extensionLocation.path
|
|
189
|
-
))));
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
catch (e) {
|
|
193
|
-
collector.error(( (localize(
|
|
194
|
-
'invalid.url.fileschema',
|
|
195
|
-
"'configuration.jsonValidation.url' is an invalid relative URL: {0}",
|
|
196
|
-
e.message
|
|
197
|
-
))));
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
else if (!/^[^:/?#]+:\/\//.test(uri)) {
|
|
201
|
-
collector.error(( (localize(
|
|
202
|
-
'invalid.url.schema',
|
|
203
|
-
"'configuration.jsonValidation.url' must be an absolute URL or start with './' to reference schemas located in the extension."
|
|
204
|
-
))));
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
const colorRegistry = ( (Registry.as(Extensions$1.ColorContribution)));
|
|
213
|
-
const colorReferenceSchema = colorRegistry.getColorReferenceSchema();
|
|
214
|
-
const colorIdPattern = '^\\w+[.\\w+]*$';
|
|
215
|
-
const configurationExtPoint = ( (ExtensionsRegistry.registerExtensionPoint({
|
|
216
|
-
extensionPoint: 'colors',
|
|
217
|
-
jsonSchema: {
|
|
218
|
-
description: ( (localize('contributes.color', 'Contributes extension defined themable colors'))),
|
|
219
|
-
type: 'array',
|
|
220
|
-
items: {
|
|
221
|
-
type: 'object',
|
|
222
|
-
properties: {
|
|
223
|
-
id: {
|
|
224
|
-
type: 'string',
|
|
225
|
-
description: ( (localize('contributes.color.id', 'The identifier of the themable color'))),
|
|
226
|
-
pattern: colorIdPattern,
|
|
227
|
-
patternErrorMessage: ( (localize(
|
|
228
|
-
'contributes.color.id.format',
|
|
229
|
-
'Identifiers must only contain letters, digits and dots and can not start with a dot'
|
|
230
|
-
))),
|
|
231
|
-
},
|
|
232
|
-
description: {
|
|
233
|
-
type: 'string',
|
|
234
|
-
description: ( (localize('contributes.color.description', 'The description of the themable color'))),
|
|
235
|
-
},
|
|
236
|
-
defaults: {
|
|
237
|
-
type: 'object',
|
|
238
|
-
properties: {
|
|
239
|
-
light: {
|
|
240
|
-
description: ( (localize(
|
|
241
|
-
'contributes.defaults.light',
|
|
242
|
-
'The default color for light themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default.'
|
|
243
|
-
))),
|
|
244
|
-
type: 'string',
|
|
245
|
-
anyOf: [
|
|
246
|
-
colorReferenceSchema,
|
|
247
|
-
{ type: 'string', format: 'color-hex' }
|
|
248
|
-
]
|
|
249
|
-
},
|
|
250
|
-
dark: {
|
|
251
|
-
description: ( (localize(
|
|
252
|
-
'contributes.defaults.dark',
|
|
253
|
-
'The default color for dark themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default.'
|
|
254
|
-
))),
|
|
255
|
-
type: 'string',
|
|
256
|
-
anyOf: [
|
|
257
|
-
colorReferenceSchema,
|
|
258
|
-
{ type: 'string', format: 'color-hex' }
|
|
259
|
-
]
|
|
260
|
-
},
|
|
261
|
-
highContrast: {
|
|
262
|
-
description: ( (localize(
|
|
263
|
-
'contributes.defaults.highContrast',
|
|
264
|
-
'The default color for high contrast dark themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default. If not provided, the `dark` color is used as default for high contrast dark themes.'
|
|
265
|
-
))),
|
|
266
|
-
type: 'string',
|
|
267
|
-
anyOf: [
|
|
268
|
-
colorReferenceSchema,
|
|
269
|
-
{ type: 'string', format: 'color-hex' }
|
|
270
|
-
]
|
|
271
|
-
},
|
|
272
|
-
highContrastLight: {
|
|
273
|
-
description: ( (localize(
|
|
274
|
-
'contributes.defaults.highContrastLight',
|
|
275
|
-
'The default color for high contrast light themes. Either a color value in hex (#RRGGBB[AA]) or the identifier of a themable color which provides the default. If not provided, the `light` color is used as default for high contrast light themes.'
|
|
276
|
-
))),
|
|
277
|
-
type: 'string',
|
|
278
|
-
anyOf: [
|
|
279
|
-
colorReferenceSchema,
|
|
280
|
-
{ type: 'string', format: 'color-hex' }
|
|
281
|
-
]
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
|
-
required: ['light', 'dark']
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
})));
|
|
290
|
-
class ColorExtensionPoint {
|
|
291
|
-
constructor() {
|
|
292
|
-
configurationExtPoint.setHandler((extensions, delta) => {
|
|
293
|
-
for (const extension of delta.added) {
|
|
294
|
-
const extensionValue = extension.value;
|
|
295
|
-
const collector = extension.collector;
|
|
296
|
-
if (!extensionValue || !Array.isArray(extensionValue)) {
|
|
297
|
-
collector.error(( (localize('invalid.colorConfiguration', "'configuration.colors' must be a array"))));
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
const parseColorValue = (s, name) => {
|
|
301
|
-
if (s.length > 0) {
|
|
302
|
-
if (s[0] === '#') {
|
|
303
|
-
return Color.Format.CSS.parseHex(s);
|
|
304
|
-
}
|
|
305
|
-
else {
|
|
306
|
-
return s;
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
collector.error(( (localize(
|
|
310
|
-
'invalid.default.colorType',
|
|
311
|
-
"{0} must be either a color value in hex (#RRGGBB[AA] or #RGB[A]) or the identifier of a themable color which provides the default.",
|
|
312
|
-
name
|
|
313
|
-
))));
|
|
314
|
-
return Color.red;
|
|
315
|
-
};
|
|
316
|
-
for (const colorContribution of extensionValue) {
|
|
317
|
-
if (typeof colorContribution.id !== 'string' || colorContribution.id.length === 0) {
|
|
318
|
-
collector.error(( (localize(
|
|
319
|
-
'invalid.id',
|
|
320
|
-
"'configuration.colors.id' must be defined and can not be empty"
|
|
321
|
-
))));
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
if (!colorContribution.id.match(colorIdPattern)) {
|
|
325
|
-
collector.error(( (localize(
|
|
326
|
-
'invalid.id.format',
|
|
327
|
-
"'configuration.colors.id' must only contain letters, digits and dots and can not start with a dot"
|
|
328
|
-
))));
|
|
329
|
-
return;
|
|
330
|
-
}
|
|
331
|
-
if (typeof colorContribution.description !== 'string' || colorContribution.id.length === 0) {
|
|
332
|
-
collector.error(( (localize(
|
|
333
|
-
'invalid.description',
|
|
334
|
-
"'configuration.colors.description' must be defined and can not be empty"
|
|
335
|
-
))));
|
|
336
|
-
return;
|
|
337
|
-
}
|
|
338
|
-
const defaults = colorContribution.defaults;
|
|
339
|
-
if (!defaults || typeof defaults !== 'object' || typeof defaults.light !== 'string' || typeof defaults.dark !== 'string') {
|
|
340
|
-
collector.error(( (localize(
|
|
341
|
-
'invalid.defaults',
|
|
342
|
-
"'configuration.colors.defaults' must be defined and must contain 'light' and 'dark'"
|
|
343
|
-
))));
|
|
344
|
-
return;
|
|
345
|
-
}
|
|
346
|
-
if (defaults.highContrast && typeof defaults.highContrast !== 'string') {
|
|
347
|
-
collector.error(( (localize(
|
|
348
|
-
'invalid.defaults.highContrast',
|
|
349
|
-
"If defined, 'configuration.colors.defaults.highContrast' must be a string."
|
|
350
|
-
))));
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
if (defaults.highContrastLight && typeof defaults.highContrastLight !== 'string') {
|
|
354
|
-
collector.error(( (localize(
|
|
355
|
-
'invalid.defaults.highContrastLight',
|
|
356
|
-
"If defined, 'configuration.colors.defaults.highContrastLight' must be a string."
|
|
357
|
-
))));
|
|
358
|
-
return;
|
|
359
|
-
}
|
|
360
|
-
colorRegistry.registerColor(colorContribution.id, {
|
|
361
|
-
light: parseColorValue(defaults.light, 'configuration.colors.defaults.light'),
|
|
362
|
-
dark: parseColorValue(defaults.dark, 'configuration.colors.defaults.dark'),
|
|
363
|
-
hcDark: parseColorValue(defaults.highContrast ?? defaults.dark, 'configuration.colors.defaults.highContrast'),
|
|
364
|
-
hcLight: parseColorValue(defaults.highContrastLight ?? defaults.light, 'configuration.colors.defaults.highContrastLight'),
|
|
365
|
-
}, colorContribution.description);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
for (const extension of delta.removed) {
|
|
369
|
-
const extensionValue = extension.value;
|
|
370
|
-
for (const colorContribution of extensionValue) {
|
|
371
|
-
colorRegistry.deregisterColor(colorContribution.id);
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
});
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
const registry = ( Registry.as(Extensions$3.JSONContribution));
|
|
378
|
-
function getDefaultSchemaAssociations() {
|
|
379
|
-
const userDataProfilesService = StandaloneServices.get(IUserDataProfilesService);
|
|
380
|
-
const profile = userDataProfilesService.defaultProfile;
|
|
381
|
-
return [{
|
|
382
|
-
fileMatch: [( profile.keybindingsResource.toString(true))],
|
|
383
|
-
uri: 'vscode://schemas/keybindings'
|
|
384
|
-
}, {
|
|
385
|
-
fileMatch: [( profile.settingsResource.toString(true))],
|
|
386
|
-
uri: 'vscode://schemas/settings/user'
|
|
387
|
-
}];
|
|
388
|
-
}
|
|
389
|
-
function getExtensionSchemaAssociations() {
|
|
390
|
-
const associations = [];
|
|
391
|
-
extensions.all.forEach(extension => {
|
|
392
|
-
const packageJSON = extension.packageJSON;
|
|
393
|
-
const jsonValidation = packageJSON?.contributes?.jsonValidation;
|
|
394
|
-
if (jsonValidation != null) {
|
|
395
|
-
if (Array.isArray(jsonValidation)) {
|
|
396
|
-
jsonValidation.forEach(jv => {
|
|
397
|
-
let { fileMatch, url } = jv;
|
|
398
|
-
if (typeof fileMatch === 'string') {
|
|
399
|
-
fileMatch = [fileMatch];
|
|
400
|
-
}
|
|
401
|
-
if (Array.isArray(fileMatch) && typeof url === 'string') {
|
|
402
|
-
let uri = url;
|
|
403
|
-
if (uri[0] === '.' && uri[1] === '/') {
|
|
404
|
-
uri = ( monaco.Uri.joinPath(extension.extensionUri, uri).toString());
|
|
405
|
-
}
|
|
406
|
-
fileMatch = ( fileMatch.map(fm => {
|
|
407
|
-
if (fm[0] === '%') {
|
|
408
|
-
fm = fm.replace(/%APP_SETTINGS_HOME%/, '/User');
|
|
409
|
-
fm = fm.replace(/%MACHINE_SETTINGS_HOME%/, '/Machine');
|
|
410
|
-
fm = fm.replace(/%APP_WORKSPACES_HOME%/, '/Workspaces');
|
|
411
|
-
}
|
|
412
|
-
else if (fm.match(/^(\w+:\/\/|\/|!)/) == null) {
|
|
413
|
-
fm = '/' + fm;
|
|
414
|
-
}
|
|
415
|
-
return fm;
|
|
416
|
-
}));
|
|
417
|
-
associations.push({ fileMatch, uri });
|
|
418
|
-
}
|
|
419
|
-
});
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
});
|
|
423
|
-
return associations;
|
|
424
|
-
}
|
|
425
|
-
const customSchemaChangeEmitter = new Emitter();
|
|
426
|
-
function getJsonSchemas() {
|
|
427
|
-
return ( Object.entries(registry.getSchemaContributions().schemas)
|
|
428
|
-
.filter(([uri]) => uri !== 'vscode://schemas/vscode-extensions')
|
|
429
|
-
.map(([uri, schema]) => ({
|
|
430
|
-
uri,
|
|
431
|
-
schema
|
|
432
|
-
})));
|
|
433
|
-
}
|
|
434
|
-
const customJsonSchema = [];
|
|
435
|
-
function registerJsonSchema(schema) {
|
|
436
|
-
customJsonSchema.push(schema);
|
|
437
|
-
customSchemaChangeEmitter.fire();
|
|
438
|
-
return new Disposable(() => {
|
|
439
|
-
const index = customJsonSchema.indexOf(schema);
|
|
440
|
-
if (index >= 0) {
|
|
441
|
-
customJsonSchema.splice(index, 1);
|
|
442
|
-
customSchemaChangeEmitter.fire();
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
|
-
}
|
|
446
|
-
function synchronizeJsonSchemas() {
|
|
447
|
-
function updateDiagnosticsOptions() {
|
|
448
|
-
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
449
|
-
...monaco.languages.json.jsonDefaults.diagnosticsOptions,
|
|
450
|
-
schemas: [
|
|
451
|
-
...getJsonSchemas(),
|
|
452
|
-
...getDefaultSchemaAssociations(),
|
|
453
|
-
...getExtensionSchemaAssociations()
|
|
454
|
-
]
|
|
455
|
-
});
|
|
456
|
-
}
|
|
457
|
-
updateDiagnosticsOptions();
|
|
458
|
-
const changeEvent = Event.any(extensions.onDidChange, customSchemaChangeEmitter.event, registry.onDidChangeSchema);
|
|
459
|
-
return changeEvent(updateDiagnosticsOptions);
|
|
460
|
-
}
|
|
461
|
-
let ExtensionPoints = class ExtensionPoints {
|
|
462
|
-
constructor(instantiationService) {
|
|
463
|
-
this.instantiationService = instantiationService;
|
|
464
|
-
this.instantiationService.createInstance(JSONValidationExtensionPoint);
|
|
465
|
-
this.instantiationService.createInstance(ColorExtensionPoint);
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
ExtensionPoints = __decorate([
|
|
469
|
-
( __param(0, IInstantiationService))
|
|
470
|
-
], ExtensionPoints);
|
|
471
|
-
( Registry.as(Extensions$2.Workbench)).registerWorkbenchContribution(ExtensionPoints, 1 );
|
|
472
114
|
function computeConfiguration(configuration, isDiffEditor, overrides) {
|
|
473
115
|
const editorConfiguration = isObject(configuration.editor) ? deepClone(configuration.editor) : Object.create(null);
|
|
474
116
|
if (isDiffEditor && isObject(configuration.diffEditor)) {
|
|
@@ -548,7 +190,39 @@ const createConfiguredDiffEditor = (domElement, options, override) => {
|
|
|
548
190
|
return instantiationService.createInstance(ConfiguredStandaloneDiffEditor, domElement, options);
|
|
549
191
|
};
|
|
550
192
|
const Extensions = {
|
|
551
|
-
...Extensions$
|
|
552
|
-
...Extensions$
|
|
193
|
+
...Extensions$1,
|
|
194
|
+
...Extensions$2
|
|
553
195
|
};
|
|
554
|
-
|
|
196
|
+
const registry = ( Registry.as(Extensions.JSONContribution));
|
|
197
|
+
function getDefaultFileMatch() {
|
|
198
|
+
const userDataProfilesService = StandaloneServices.get(IUserDataProfilesService);
|
|
199
|
+
const profile = userDataProfilesService.defaultProfile;
|
|
200
|
+
return {
|
|
201
|
+
keybindings: [( profile.keybindingsResource.toString(true))],
|
|
202
|
+
'settings/user': [( profile.settingsResource.toString(true))]
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function getJsonSchemas(fileMatchs = getDefaultFileMatch()) {
|
|
206
|
+
return ( Object.entries(registry.getSchemaContributions().schemas)
|
|
207
|
+
.filter(([uri]) => uri !== 'vscode://schemas/vscode-extensions')
|
|
208
|
+
.map(([uri, schema]) => {
|
|
209
|
+
const path = monaco.Uri.parse(uri).path;
|
|
210
|
+
const schemaName = path.slice(1);
|
|
211
|
+
return {
|
|
212
|
+
uri,
|
|
213
|
+
schema,
|
|
214
|
+
fileMatch: fileMatchs[schemaName]
|
|
215
|
+
};
|
|
216
|
+
}));
|
|
217
|
+
}
|
|
218
|
+
function synchronizeJsonSchemas() {
|
|
219
|
+
function updateDiagnosticsOptions() {
|
|
220
|
+
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
221
|
+
...monaco.languages.json.jsonDefaults.diagnosticsOptions,
|
|
222
|
+
schemas: getJsonSchemas()
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
updateDiagnosticsOptions();
|
|
226
|
+
return registry.onDidChangeSchema(updateDiagnosticsOptions);
|
|
227
|
+
}
|
|
228
|
+
export { Extensions, createConfiguredDiffEditor, createConfiguredEditor, createModelReference, deleteFile, synchronizeJsonSchemas, writeFile };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { registerExtension } from './api2.js';
|
|
2
|
+
import { onExtHostInitialized } from './polyfill.js';
|
|
3
|
+
var manifest = {name:"objective-c",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ./build/update-grammars.js"},contributes:{languages:[{id:"objective-c",extensions:[".m"],aliases:["Objective-C"],configuration:"./language-configuration.json"},{id:"objective-cpp",extensions:[".mm"],aliases:["Objective-C++"],configuration:"./language-configuration.json"}],grammars:[{language:"objective-c",scopeName:"source.objc",path:"./syntaxes/objective-c.tmLanguage.json"},{language:"objective-cpp",scopeName:"source.objcpp",path:"./syntaxes/objective-c++.tmLanguage.json"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"}};
|
|
4
|
+
onExtHostInitialized(() => {
|
|
5
|
+
const { registerFile } = registerExtension(manifest);
|
|
6
|
+
registerFile('./language-configuration.json', async () => await import('./language-configuration23.js').then(module => module.default ?? module)),
|
|
7
|
+
registerFile('./language-configuration.json', async () => await import('./language-configuration23.js').then(module => module.default ?? module)),
|
|
8
|
+
registerFile('./syntaxes/objective-c.tmLanguage.json', async () => await import('./objective-c.tmLanguage.js').then(module => module.default ?? module)),
|
|
9
|
+
registerFile('./syntaxes/objective-c++.tmLanguage.json', async () => await import('./objective-c__.tmLanguage.js').then(module => module.default ?? module));
|
|
10
|
+
});
|
package/dist/perl.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { registerExtension } from './api2.js';
|
|
2
|
+
import { onExtHostInitialized } from './polyfill.js';
|
|
3
|
+
var manifest = {name:"perl",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"*"},scripts:{"update-grammar":"node ../node_modules/vscode-grammar-updater/bin textmate/perl.tmbundle Syntaxes/Perl.plist ./syntaxes/perl.tmLanguage.json Syntaxes/Perl%206.tmLanguage ./syntaxes/perl6.tmLanguage.json"},contributes:{languages:[{id:"perl",aliases:["Perl","perl"],extensions:[".pl",".pm",".pod",".t",".PL",".psgi"],firstLine:"^#!.*\\bperl\\b",configuration:"./perl.language-configuration.json"},{id:"perl6",aliases:["Perl 6","perl6"],extensions:[".p6",".pl6",".pm6",".nqp"],firstLine:"(^#!.*\\bperl6\\b)|use\\s+v6",configuration:"./perl6.language-configuration.json"}],grammars:[{language:"perl",scopeName:"source.perl",path:"./syntaxes/perl.tmLanguage.json"},{language:"perl6",scopeName:"source.perl.6",path:"./syntaxes/perl6.tmLanguage.json"}]},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"}};
|
|
4
|
+
onExtHostInitialized(() => {
|
|
5
|
+
const { registerFile } = registerExtension(manifest);
|
|
6
|
+
registerFile('./perl.language-configuration.json', async () => await import('./perl.language-configuration.js').then(module => module.default ?? module)),
|
|
7
|
+
registerFile('./perl6.language-configuration.json', async () => await import('./perl6.language-configuration.js').then(module => module.default ?? module)),
|
|
8
|
+
registerFile('./syntaxes/perl.tmLanguage.json', async () => await import('./perl.tmLanguage.js').then(module => module.default ?? module)),
|
|
9
|
+
registerFile('./syntaxes/perl6.tmLanguage.json', async () => await import('./perl6.tmLanguage.js').then(module => module.default ?? module));
|
|
10
|
+
});
|
package/dist/php.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { registerExtension } from './api2.js';
|
|
2
|
+
import { onExtHostInitialized } from './polyfill.js';
|
|
3
|
+
var manifest = {name:"php",displayName:"%displayName%",description:"%description%",version:"1.0.0",publisher:"vscode",license:"MIT",engines:{vscode:"0.10.x"},contributes:{languages:[{id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],firstLine:"^#!\\s*/.*\\bphp\\b",mimetypes:["application/x-php"],configuration:"./language-configuration.json"}],grammars:[{language:"php",scopeName:"source.php",path:"./syntaxes/php.tmLanguage.json"},{language:"php",scopeName:"text.html.php",path:"./syntaxes/html.tmLanguage.json",embeddedLanguages:{"text.html":"html","source.php":"php","source.sql":"sql","text.xml":"xml","source.js":"javascript","source.json":"json","source.css":"css"}}],snippets:[{language:"php",path:"./snippets/php.code-snippets"}]},scripts:{"update-grammar":"node ./build/update-grammar.mjs"},repository:{type:"git",url:"https://github.com/microsoft/vscode.git"}};
|
|
4
|
+
onExtHostInitialized(() => {
|
|
5
|
+
const { registerFile } = registerExtension(manifest);
|
|
6
|
+
registerFile('./language-configuration.json', async () => await import('./language-configuration24.js').then(module => module.default ?? module)),
|
|
7
|
+
registerFile('./syntaxes/php.tmLanguage.json', async () => await import('./php.tmLanguage.js').then(module => module.default ?? module)),
|
|
8
|
+
registerFile('./syntaxes/html.tmLanguage.json', async () => await import('./html.tmLanguage2.js').then(module => module.default ?? module)),
|
|
9
|
+
registerFile('./snippets/php.code-snippets', async () => await import('./php2.js').then(module => module.default ?? module));
|
|
10
|
+
});
|
package/dist/php2.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var php = "{\n\t\"class …\": {\n\t\t\"prefix\": \"class\",\n\t\t\"body\": [\n\t\t\t\"class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}}\",\n\t\t\t\"{\",\n\t\t\t\"\\t$0\",\n\t\t\t\"}\",\n\t\t\t\"\"\n\t\t],\n\t\t\"description\": \"Class definition\"\n\t},\n\t\"PHPDoc class …\": {\n\t\t\"prefix\": \"doc_class\",\n\t\t\"isFileTemplate\": true,\n\t\t\"body\": [\n\t\t\t\"/**\",\n\t\t\t\" * ${6:undocumented class}\",\n\t\t\t\" */\",\n\t\t\t\"class ${1:ClassName} ${2:extends ${3:AnotherClass}} ${4:implements ${5:Interface}}\",\n\t\t\t\"{\",\n\t\t\t\"\\t$0\",\n\t\t\t\"}\",\n\t\t\t\"\"\n\t\t],\n\t\t\"description\": \"Documented Class Declaration\"\n\t},\n\t\"function __construct\": {\n\t\t\"prefix\": \"con\",\n\t\t\"body\": [\n\t\t\t\"${1:public} function __construct(${2:${3:Type} $${4:var}${5: = ${6:null}}}) {\",\n \"\\t\\\\$this->${4:var} = $${4:var};$0\",\n \"}\"\n\t\t]\n\t},\n\t\"PHPDoc property\": {\n\t\t\"prefix\": \"doc_v\",\n\t\t\"body\": [\n\t\t\t\"/** @var ${1:Type} $${2:var} ${3:description} */\",\n\t\t\t\"${4:protected} $${2:var}${5: = ${6:null}};$0\"\n\t\t],\n\t\t\"description\": \"Documented Class Variable\"\n\t},\n\t\"PHPDoc function …\": {\n\t\t\"prefix\": \"doc_f\",\n\t\t\"isFileTemplate\": true,\n\t\t\"body\": [\n\t\t\t\"/**\",\n\t\t\t\" * ${1:undocumented function summary}\",\n\t\t\t\" *\",\n\t\t\t\" * ${2:Undocumented function long description}\",\n\t\t\t\" *\",\n\t\t\t\"${3: * @param ${4:Type} $${5:var} ${6:Description}}\",\n\t\t\t\"${7: * @return ${8:type}}\",\n\t\t\t\"${9: * @throws ${10:conditon}}\",\n\t\t\t\" **/\",\n\t\t\t\"${11:public }function ${12:FunctionName}(${13:${14:${4:Type} }$${5:var}${15: = ${16:null}}})\",\n\t\t\t\"{\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Documented function\"\n\t},\n\t\"PHPDoc param …\": {\n\t\t\"prefix\": \"param\",\n\t\t\"body\": [\n\t\t\t\"* @param ${1:Type} ${2:var} ${3:Description}$0\"\n\t\t],\n\t\t\"description\": \"Parameter documentation\"\n\t},\n\t\"function …\": {\n\t\t\"prefix\": \"fun\",\n\t\t\"body\": [\n\t\t\t\"${1:public }function ${2:FunctionName}(${3:${4:${5:Type} }$${6:var}${7: = ${8:null}}})\",\n\t\t\t\"{\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Function\"\n\t},\n\t\"trait …\": {\n\t\t\"prefix\": \"trait\",\n\t\t\"body\": [\n\t\t\t\"/**\",\n\t\t\t\" * $1\",\n\t\t\t\" */\",\n\t\t\t\"trait ${2:TraitName}\",\n\t\t\t\"{\",\n\t\t\t\"\\t$0\",\n\t\t\t\"}\",\n\t\t\t\"\"\n\t\t],\n\t\t\"description\": \"Trait\"\n\t},\n\t\"define(…, …)\": {\n\t\t\"prefix\": \"def\",\n\t\t\"body\": [\n\t\t\t\"define('$1', ${2:'$3'});\",\n\t\t\t\"$0\"\n\t\t],\n\t\t\"description\": \"Definition\"\n\t},\n\t\"do … while …\": {\n\t\t\"prefix\": \"do\",\n\t\t\"body\": [\n\t\t\t\"do {\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"} while (${1:$${2:a} <= ${3:10}});\"\n\t\t],\n\t\t\"description\": \"Do-While loop\"\n\t},\n\t\t\"while …\": {\n\t\t\"prefix\": \"while\",\n\t\t\"body\": [\n\t\t\t\"while (${1:$${2:a} <= ${3:10}}) {\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"While-loop\"\n\t},\n\t\"if …\": {\n\t\t\"prefix\": \"if\",\n\t\t\"body\": [\n\t\t\t\"if (${1:condition}) {\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"If block\"\n\t},\n\t\"if … else …\": {\n\t\t\"prefix\": \"ifelse\",\n\t\t\"body\": [\n\t\t\t\"if (${1:condition}) {\",\n\t\t\t\"\\t${2:# code...}\",\n\t\t\t\"} else {\",\n\t\t\t\"\\t${3:# code...}\",\n\t\t\t\"}\",\n\t\t\t\"$0\"\n\t\t],\n\t\t\"description\": \"If Else block\"\n\t},\n\t\"$… = ( … ) ? … : …\": {\n\t\t\"prefix\": \"if?\",\n\t\t\"body\": \"$${1:retVal} = (${2:condition}) ? ${3:a} : ${4:b} ;\",\n\t\t\"description\": \"Ternary conditional assignment\"\n\t},\n\t\"else …\": {\n\t\t\"prefix\": \"else\",\n\t\t\"body\": [\n\t\t\t\"else {\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Else block\"\n\t},\n\t\"elseif …\": {\n\t\t\"prefix\": \"elseif\",\n\t\t\"body\": [\n\t\t\t\"elseif (${1:condition}) {\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Elseif block\"\n\t},\n\t\"for …\": {\n\t\t\"prefix\": \"for\",\n\t\t\"body\": [\n\t\t\t\"for ($${1:i}=${2:0}; $${1:i} < $3; $${1:i}++) { \",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"For-loop\"\n\t},\n\t\"foreach …\": {\n\t\t\"prefix\": \"foreach\",\n\t\t\"body\": [\n\t\t\t\"foreach ($${1:variable} as $${2:key} ${3:=> $${4:value}}) {\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Foreach loop\"\n\t},\n\t\"$… = array (…)\": {\n\t\t\"prefix\": \"array\",\n\t\t\"body\": \"$${1:arrayName} = array('$2' => $3${4:,} $0);\",\n\t\t\"description\": \"Array initializer\"\n\t},\n\t\"$… = […]\": {\n\t\t\"prefix\": \"shorray\",\n\t\t\"body\": \"$${1:arrayName} = ['$2' => $3${4:,} $0];\",\n\t\t\"description\": \"Array initializer\"\n\t},\n\t\"… => …\": {\n\t\t\"prefix\": \"keyval\",\n\t\t\"body\": \"'$1' => $2${3:,} $0\",\n\t\t\"description\": \"Key-Value initializer\"\n\t},\n\t\"switch …\": {\n\t\t\"prefix\": \"switch\",\n\t\t\"body\": [\n\t\t\t\"switch (\\\\$${1:variable}) {\",\n\t\t\t\"\\tcase '${2:value}':\",\n\t\t\t\"\\t\\t${3:# code...}\",\n\t\t\t\"\\t\\tbreak;\",\n\t\t\t\"\\t$0\",\n\t\t\t\"\\tdefault:\",\n\t\t\t\"\\t\\t${4:# code...}\",\n\t\t\t\"\\t\\tbreak;\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Switch block\"\n\t},\n\t\"case …\": {\n\t\t\"prefix\": \"case\",\n\t\t\"body\": [\n\t\t\t\"case '${1:value}':\",\n\t\t\t\"\\t${0:# code...}\",\n\t\t\t\"\\tbreak;\"\n\t\t],\n\t\t\"description\": \"Case Block\"\n\t},\n\t\"$this->…\": {\n\t\t\"prefix\": \"this\",\n\t\t\"body\": \"\\\\$this->$0;\",\n\t\t\"description\": \"$this->...\"\n\t},\n\t\"echo $this->…\": {\n\t\t\"prefix\": \"ethis\",\n\t\t\"body\": \"echo \\\\$this->$0;\",\n\t\t\"description\": \"Echo this\"\n\t},\n\t\"Throw Exception\": {\n\t\t\"prefix\": \"throw\",\n\t\t\"body\": [\n\t\t\t\"throw new $1Exception(${2:\\\"${3:Error Processing Request}\\\"}${4:, ${5:1}});\",\n\t\t\t\"$0\"\n\t\t],\n\t\t\"description\": \"Throw exception\"\n\t},\n\t\"Region Start\": {\n\t\t\"prefix\": \"#region\",\n\t\t\"body\": [\n\t\t\t\"#region\"\n\t\t],\n\t\t\"description\": \"Folding Region Start\"\n\t},\n\t\"Region End\": {\n\t\t\"prefix\": \"#endregion\",\n\t\t\"body\": [\n\t\t\t\"#endregion\"\n\t\t],\n\t\t\"description\": \"Folding Region End\"\n\t},\n\t\"Try Catch Block\": {\n\t\t\"prefix\": \"try\",\n\t\t\"body\": [\n\t\t\t\"try {\",\n\t\t\t\"\\t${1://code...}\",\n\t\t\t\"} catch (${2:\\\\Throwable} ${3:\\\\$th}) {\",\n\t\t\t\"\\t${4://throw \\\\$th;}\",\n\t\t\t\"}\"\n\t\t],\n\t\t\"description\": \"Try catch block\"\n\t}\n}\n";
|
|
2
|
+
export { php as default };
|