mirror of
https://github.com/microsoft/vscode.git
synced 2026-03-02 14:58:43 +00:00
Only send TS plugins that have registered for the document's language
Addresses comment on c2ee6133aa
This commit is contained in:
@@ -54,12 +54,14 @@ class SyncedBuffer {
|
||||
}
|
||||
|
||||
if (this.client.apiVersion.has240Features()) {
|
||||
if (this.client.plugins.length) {
|
||||
(args as any).plugins = this.client.plugins.map(x => x.name);
|
||||
const tsPluginsForDocument = this.client.plugins
|
||||
.filter(x => x.languages.indexOf(this.document.languageId) >= 0);
|
||||
|
||||
if (tsPluginsForDocument.length) {
|
||||
(args as any).plugins = tsPluginsForDocument.map(plugin => plugin.name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.client.execute('open', args, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user