make sure service start on activate
This commit is contained in:
parent
259518c9e3
commit
8b7ad4c5ee
2 changed files with 5 additions and 2 deletions
|
@ -26,8 +26,7 @@
|
||||||
"onCommand:javascript.goToProjectConfig",
|
"onCommand:javascript.goToProjectConfig",
|
||||||
"onCommand:typescript.goToProjectConfig",
|
"onCommand:typescript.goToProjectConfig",
|
||||||
"onCommand:typescript.openTsServerLog",
|
"onCommand:typescript.openTsServerLog",
|
||||||
"onCommand:tsserver.watchBuild",
|
"onCommand:tsserver.watchBuild"
|
||||||
"onLanguage:jsonc"
|
|
||||||
],
|
],
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"commands": [
|
"commands": [
|
||||||
|
|
|
@ -12,6 +12,10 @@ export async function activate(context: ExtensionContext): Promise<void> {
|
||||||
(services as any).regist(service)
|
(services as any).regist(service)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (!service.clientHost) {
|
||||||
|
await service.start()
|
||||||
|
}
|
||||||
|
|
||||||
function registCommand(cmd: Command): void {
|
function registCommand(cmd: Command): void {
|
||||||
let { id, execute } = cmd
|
let { id, execute } = cmd
|
||||||
subscriptions.push(commands.registerCommand(id as string, execute, cmd))
|
subscriptions.push(commands.registerCommand(id as string, execute, cmd))
|
||||||
|
|
Loading…
Add table
Reference in a new issue