Skip to content

Commit

Permalink
listen to activate all languages even witout grammar contributions
Browse files Browse the repository at this point in the history
fix eclipse-theia#7111

Signed-off-by: tom-shan <[email protected]>
  • Loading branch information
tom-shan committed Feb 10, 2020
1 parent d5f3262 commit 12085ee
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,14 @@ export class PluginContributionHandler {
embeddedLanguages: this.convertEmbeddedLanguages(grammar.embeddedLanguages, logError),
tokenTypes: this.convertTokenTypes(grammar.tokenTypes)
}));
pushContribution(`grammar.language.${language}.activation`,
() => this.onDidActivateLanguage(language, () => this.monacoTextmateService.activateLanguage(language))
);
}
if (grammars.indexOf(grammar) === (grammars.length - 1)) {
if (languages && languages.length) {
for (const lang of languages) {
pushContribution(`language.${lang.id}.activation`,
() => this.onDidActivateLanguage(lang.id, () => this.monacoTextmateService.activateLanguage(lang.id)));
}
}
}
});
}
Expand Down

0 comments on commit 12085ee

Please sign in to comment.