[json] Improved snippets proposals for extension developments
This commit is contained in:
parent
4cd256d4db
commit
d491308684
|
@ -31,10 +31,9 @@ interface IModeConfigurationMap { [modeId: string]: any; }
|
|||
let languagesExtPoint = ExtensionsRegistry.registerExtensionPoint<ILanguageExtensionPoint[]>('languages', {
|
||||
description: nls.localize('vscode.extension.contributes.languages', 'Contributes language declarations.'),
|
||||
type: 'array',
|
||||
defaultSnippets: [{ body: [{ id: '', aliases: [], extensions: [] }] }],
|
||||
items: {
|
||||
type: 'object',
|
||||
defaultSnippets: [{ body: { id: '', extensions: [] } }],
|
||||
defaultSnippets: [{ body: { id: '{{languageId}}', aliases: ['{{label}}'], extensions: ['{{extension}}'], configuration: './language-configuration.json'} }],
|
||||
properties: {
|
||||
id: {
|
||||
description: nls.localize('vscode.extension.contributes.languages.id', 'ID of the language.'),
|
||||
|
@ -82,7 +81,8 @@ let languagesExtPoint = ExtensionsRegistry.registerExtensionPoint<ILanguageExten
|
|||
},
|
||||
configuration: {
|
||||
description: nls.localize('vscode.extension.contributes.languages.configuration', 'A relative path to a file containing configuration options for the language.'),
|
||||
type: 'string'
|
||||
type: 'string',
|
||||
default: './language-configuration.json'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,7 +249,8 @@ const schema: IJSONSchema = {
|
|||
description: nls.localize('vscode.extension.activationEvents', 'Activation events for the VS Code extension.'),
|
||||
type: 'array',
|
||||
items: {
|
||||
type: 'string'
|
||||
type: 'string',
|
||||
defaultSnippets: [{ label: 'onLanguage', body: 'onLanguage:{{languageId}}'}, {label: 'onCommand', body: 'onCommand:{{commandId}}'}, {label: 'onDebug', body: 'onDebug:{{type}}'}, {label: 'workspaceContains', body: 'workspaceContains:{{fileName}}'}],
|
||||
}
|
||||
},
|
||||
extensionDependencies: {
|
||||
|
|
Loading…
Reference in a new issue