mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 08:14:36 -05:00
Implicitly activate only main language contribs (#179287)
This commit is contained in:
@@ -525,7 +525,8 @@ function parseImplicitActivationEvents(tree: JsonNode): Set<string> {
|
||||
const languageContributions = findNodeAtLocation(tree, ['contributes', 'languages']);
|
||||
languageContributions?.children?.forEach(child => {
|
||||
const id = findNodeAtLocation(child, ['id']);
|
||||
if (id && id.type === 'string') {
|
||||
const configuration = findNodeAtLocation(child, ['configuration']);
|
||||
if (id && id.type === 'string' && configuration && configuration.type === 'string') {
|
||||
activationEvents.add(`onLanguage:${id.value}`);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -107,7 +107,7 @@ export const languagesExtPoint: IExtensionPoint<IRawLanguageExtensionPoint[]> =
|
||||
},
|
||||
activationEventsGenerator: (languageContributions, result) => {
|
||||
for (const languageContribution of languageContributions) {
|
||||
if (languageContribution.id) {
|
||||
if (languageContribution.id && languageContribution.configuration) {
|
||||
result.push(`onLanguage:${languageContribution.id}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user