You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: localize('vscode.extension.contributes.languages.configuration','A relative path to a file containing configuration options for the language.'),
85
87
type: 'string',
86
88
default: './language-configuration.json'
89
+
},
90
+
icon: {
91
+
type: 'object',
92
+
description: localize('vscode.extension.contributes.languages.icon','A icon to use as file icon, if no icon theme provides one for the language.'),
93
+
properties: {
94
+
light: {
95
+
description: localize('vscode.extension.contributes.languages.icon.light','Icon path when a light theme is used'),
96
+
type: 'string'
97
+
},
98
+
dark: {
99
+
description: localize('vscode.extension.contributes.languages.icon.dark','Icon path when a dark theme is used'),
100
+
type: 'string'
101
+
}
102
+
}
87
103
}
88
104
}
89
105
}
@@ -116,7 +132,7 @@ export class WorkbenchLanguageService extends LanguageService {
collector.error(localize('invalid.empty',"Empty value for `contributes.{0}`",languagesExtPoint.name));
190
210
returnfalse;
@@ -217,6 +237,17 @@ function isValidLanguageExtensionPoint(value: IRawLanguageExtensionPoint, collec
217
237
collector.error(localize('opt.mimetypes',"property `{0}` can be omitted and must be of type `string[]`",'mimetypes'));
218
238
returnfalse;
219
239
}
240
+
if(typeofvalue.icon!=='undefined'){
241
+
constproposal='languageIcon';
242
+
if(!isProposedApiEnabled(extension,proposal)){
243
+
collector.error(`Extension '${extension.identifier.value}' CANNOT use API proposal: ${proposal}.\nIts package.json#enabledApiProposals-property declares: ${extension.enabledApiProposals?.join(', ')??'[]'} but NOT ${proposal}.\n The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${extension.identifier.value}`);
collector.error(localize('opt.icon',"property `{0}` can be omitted and must be of type `object` with properties `{1}` and `{2}` of type `string`",'icon','light','dark'));
0 commit comments