diff --git a/src/services.ts b/src/services.ts index 22e1363e857..b359206d1f2 100644 --- a/src/services.ts +++ b/src/services.ts @@ -272,7 +272,8 @@ export class ServiceManager extends EventEmitter implements Disposable { if (!created) { if (typeof name == 'string' && !client) { let config: LanguageServerConfig = workspace.getConfiguration().get<{ key: LanguageServerConfig }>('languageserver', {} as any)[name] - if (!config || !config.enable) return + // eslint-disable-next-line @typescript-eslint/no-unnecessary-boolean-literal-compare + if (!config || config.enable === false) return let opts = getLanguageServerOptions(id, name, config) if (!opts) return client = new LanguageClient(id, name, opts[1], opts[0]) diff --git a/src/types.ts b/src/types.ts index 7d28c210853..69872932d6e 100644 --- a/src/types.ts +++ b/src/types.ts @@ -342,7 +342,7 @@ export interface LanguageServerConfig { disableDiagnostics?: boolean filetypes: string[] additionalSchemes: string[] - enable: boolean + enable?: boolean args?: string[] cwd?: string env?: any