Add two alternative language-changing interface functions

This commit is contained in:
mechatroner
2018-08-03 00:48:14 -04:00
parent 2582f425b6
commit 2eabbee449
11 changed files with 76 additions and 10 deletions

View File

@@ -258,6 +258,9 @@ export function createApiFactory(
getLanguages(): TPromise<string[]> {
return extHostLanguages.getLanguages();
},
setLanguageById(documentUri: vscode.Uri, languageId: string): TPromise<void> {
return extHostLanguages.setLanguageById(documentUri, languageId);
},
match(selector: vscode.DocumentSelector, document: vscode.TextDocument): number {
return score(typeConverters.LanguageSelector.from(selector), document.uri, document.languageId, true);
},