Skip to content

Commit

Permalink
Fix onLanguage activation event (#13630)
Browse files Browse the repository at this point in the history
According to the the VSCode documentation `onLanguage` (without any
language specified) is a valid activation event.
This is used in the built-in emmet extension for example.
Beforehand extensions with this event were not triggered.
With this commit the extensions with `onLanguage` are activated,
when the first language is loaded.
  • Loading branch information
sgraband authored Apr 22, 2024
1 parent 7969734 commit 346822b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/plugin-ext/src/hosted/browser/hosted-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ export class HostedPluginSupport extends AbstractHostedPluginSupport<PluginManag
}

async activateByLanguage(languageId: string): Promise<void> {
await this.activateByEvent('onLanguage');
await this.activateByEvent(`onLanguage:${languageId}`);
}

Expand Down

0 comments on commit 346822b

Please sign in to comment.