Skip to content

Commit

Permalink
Only send TS plugins that have registered for the document's language
Browse files Browse the repository at this point in the history
Addresses comment on c2ee613
  • Loading branch information
mjbvz committed Aug 18, 2017
1 parent 799a4ea commit aebaece
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions extensions/typescript/src/features/bufferSyncSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit aebaece

Please sign in to comment.