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:
parent
9d59cb9813
commit
90de01176e
|
@ -93,10 +93,12 @@ export class TypeScriptServerSpawner {
|
||||||
return CompositeServerType.Single;
|
return CompositeServerType.Single;
|
||||||
|
|
||||||
case SeparateSyntaxServerConfiguration.Enabled:
|
case SeparateSyntaxServerConfiguration.Enabled:
|
||||||
return version.apiVersion?.gte(API.v340) ? CompositeServerType.SeparateSyntax : CompositeServerType.Single;
|
if (version.apiVersion?.gte(API.v340)) {
|
||||||
|
return version.apiVersion?.gte(API.v400)
|
||||||
case SeparateSyntaxServerConfiguration.Dynamic:
|
? CompositeServerType.DynamicSeparateSyntax
|
||||||
return version.apiVersion?.gte(API.v400) ? CompositeServerType.DynamicSeparateSyntax : CompositeServerType.Single;
|
: CompositeServerType.SeparateSyntax;
|
||||||
|
}
|
||||||
|
return CompositeServerType.Single;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,6 @@ export namespace TsServerLogLevel {
|
||||||
export const enum SeparateSyntaxServerConfiguration {
|
export const enum SeparateSyntaxServerConfiguration {
|
||||||
Disabled,
|
Disabled,
|
||||||
Enabled,
|
Enabled,
|
||||||
Dynamic,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TypeScriptServiceConfiguration {
|
export class TypeScriptServiceConfiguration {
|
||||||
|
@ -168,9 +167,6 @@ export class TypeScriptServiceConfiguration {
|
||||||
if (value === true) {
|
if (value === true) {
|
||||||
return SeparateSyntaxServerConfiguration.Enabled;
|
return SeparateSyntaxServerConfiguration.Enabled;
|
||||||
}
|
}
|
||||||
if (value === 'dynamic') {
|
|
||||||
return SeparateSyntaxServerConfiguration.Dynamic;
|
|
||||||
}
|
|
||||||
return SeparateSyntaxServerConfiguration.Disabled;
|
return SeparateSyntaxServerConfiguration.Disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue