Always enable dynamic syntax server on TS 4.0+

We are looking for feedback on this new setting. For those on TS 4.0+, it should also be a sensible default
This commit is contained in:
Matt Bierner 2020-06-26 16:18:36 -07:00
parent 9d59cb9813
commit 90de01176e
2 changed files with 6 additions and 8 deletions

View file

@ -93,10 +93,12 @@ export class TypeScriptServerSpawner {
return CompositeServerType.Single;
case SeparateSyntaxServerConfiguration.Enabled:
return version.apiVersion?.gte(API.v340) ? CompositeServerType.SeparateSyntax : CompositeServerType.Single;
case SeparateSyntaxServerConfiguration.Dynamic:
return version.apiVersion?.gte(API.v400) ? CompositeServerType.DynamicSeparateSyntax : CompositeServerType.Single;
if (version.apiVersion?.gte(API.v340)) {
return version.apiVersion?.gte(API.v400)
? CompositeServerType.DynamicSeparateSyntax
: CompositeServerType.SeparateSyntax;
}
return CompositeServerType.Single;
}
}

View file

@ -49,7 +49,6 @@ export namespace TsServerLogLevel {
export const enum SeparateSyntaxServerConfiguration {
Disabled,
Enabled,
Dynamic,
}
export class TypeScriptServiceConfiguration {
@ -168,9 +167,6 @@ export class TypeScriptServiceConfiguration {
if (value === true) {
return SeparateSyntaxServerConfiguration.Enabled;
}
if (value === 'dynamic') {
return SeparateSyntaxServerConfiguration.Dynamic;
}
return SeparateSyntaxServerConfiguration.Disabled;
}