diff --git a/package.json b/package.json index 0ed5999..825cfe0 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,9 @@ "prepare": "yarn clean && yarn build" }, "contributes": { + "activationEvents": [ + "*" + ], "commands": [ { "title": "Reload current project", diff --git a/src/server/index.ts b/src/server/index.ts index 75c4964..07e6fd6 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -35,6 +35,8 @@ export default class TsserverService implements IServiceProvider { this.selector = this.descriptions.reduce((arr, c) => { return arr.concat(c.modeIds) }, []) + this.clientHost = new TypeScriptServiceClientHost(this.descriptions) + this.disposables.push(this.clientHost) } public get config(): WorkspaceConfiguration { @@ -42,8 +44,6 @@ export default class TsserverService implements IServiceProvider { } public start(): Promise { - this.clientHost = new TypeScriptServiceClientHost(this.descriptions) - this.disposables.push(this.clientHost) Object.defineProperty(this, 'state', { get: () => { return this.clientHost.serviceClient.state