mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-21 13:36:49 +01:00
Only send TS plugins that have registered for the document's language
Addresses comment on https://github.com/Microsoft/vscode/commit/c2ee6133aa87d915f246e1ce1c33ef9b4f1b3888
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