feat(client): create client on actived
This commit is contained in:
parent
e75600b67e
commit
da3607afc3
2 changed files with 5 additions and 2 deletions
|
@ -13,6 +13,9 @@
|
|||
"prepare": "yarn clean && yarn build"
|
||||
},
|
||||
"contributes": {
|
||||
"activationEvents": [
|
||||
"*"
|
||||
],
|
||||
"commands": [
|
||||
{
|
||||
"title": "Reload current project",
|
||||
|
|
|
@ -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<void> {
|
||||
this.clientHost = new TypeScriptServiceClientHost(this.descriptions)
|
||||
this.disposables.push(this.clientHost)
|
||||
Object.defineProperty(this, 'state', {
|
||||
get: () => {
|
||||
return this.clientHost.serviceClient.state
|
||||
|
|
Loading…
Reference in a new issue