src/vs/editor/standalone/browser/standaloneLanguages.ts/onLanguage
export function onLanguage(languageId: string, callback: () => void): IDisposable {
	const languageService = StandaloneServices.get(ILanguageService);
	const disposable = languageService.onDidEncounterLanguage((encounteredLanguageId) => {
		if (encounteredLanguageId === languageId) {
			// stop listening
			disposable.dispose();
			// invoke actual listener
			callback();
		}
	});
	return disposable;
}