extensions/emmet/src/emmetCommon.ts/registerCompletionProviders
function registerCompletionProviders(context: vscode.ExtensionContext) {
	let completionProvider = new DefaultCompletionItemProvider();
	let includedLanguages = getMappingForIncludedLanguages();

	Object.keys(includedLanguages).forEach(language => {
		if (languageMappingForCompletionProviders.has(language) && languageMappingForCompletionProviders.get(language) === includedLanguages[language]) {
			return;
		}

		if (languageMappingForCompletionProviders.has(language)) {
			const mapping = completionProvidersMapping.get(language);
			if (mapping) {
				mapping.dispose();
			}
			languageMappingForCompletionProviders.delete(language);
			completionProvidersMapping.delete(language);
		}

		const provider = vscode.languages.registerCompletionItemProvider({ language, scheme: '*' }, completionProvider, ...LANGUAGE_MODES[includedLanguages[language]]);
		context.subscriptions.push(provider);

		languageMappingForCompletionProviders.set(language, includedLanguages[language]);
		completionProvidersMapping.set(language, provider);
	});

	Object.keys(LANGUAGE_MODES).forEach(language => {
		if (!languageMappingForCompletionProviders.has(language)) {
			const provider = vscode.languages.registerCompletionItemProvider({ language, scheme: '*' }, completionProvider, ...LANGUAGE_MODES[language]);
			context.subscriptions.push(provider);

			languageMappingForCompletionProviders.set(language, language);
			completionProvidersMapping.set(language, provider);
		}
	});
}