未验证 提交 8b0f06be 编写于 作者: M Matt Bierner 提交者: GitHub

Merge pull request #75371 from andrius-pra/external-typescript-plugin-files

Sync languages provided by Typescript plugins
......@@ -24,6 +24,7 @@ import { PluginManager } from './utils/plugins';
import * as typeConverters from './utils/typeConverters';
import TypingsStatus, { AtaProgressReporter } from './utils/typingsStatus';
import VersionStatus from './utils/versionStatus';
import { flatten } from './utils/arrays';
// Style check diagnostics that can be reported as warnings
const styleCheckDiagnostics = [
......@@ -68,7 +69,7 @@ export default class TypeScriptServiceClientHost extends Disposable {
configFileWatcher.onDidDelete(handleProjectCreateOrDelete, this, this._disposables);
configFileWatcher.onDidChange(handleProjectChange, this, this._disposables);
const allModeIds = this.getAllModeIds(descriptions);
const allModeIds = this.getAllModeIds(descriptions, pluginManager);
this.client = this._register(new TypeScriptServiceClient(
workspaceState,
version => this.versionStatus.onDidChangeTypeScriptVersion(version),
......@@ -138,11 +139,11 @@ export default class TypeScriptServiceClientHost extends Disposable {
this.configurationChanged();
}
private getAllModeIds(descriptions: LanguageDescription[]) {
const allModeIds: string[] = [];
for (const description of descriptions) {
allModeIds.push(...description.modeIds);
}
private getAllModeIds(descriptions: LanguageDescription[], pluginManager: PluginManager) {
const allModeIds = flatten([
...descriptions.map(x => x.modeIds),
...pluginManager.plugins.map(x => x.languages)
]);
return allModeIds;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册