From 32b7c72ddf3ea0410396c0c2d114359d21a533f6 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Wed, 10 Apr 2024 15:32:33 +0900 Subject: [PATCH] fix(vscode): restart tsserver before restart vue language server close #4242 --- extensions/vscode/src/common.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/src/common.ts b/extensions/vscode/src/common.ts index 72574272cd..501077bd5c 100644 --- a/extensions/vscode/src/common.ts +++ b/extensions/vscode/src/common.ts @@ -282,14 +282,14 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang async function activateRestartRequest() { context.subscriptions.push(vscode.commands.registerCommand('vue.action.restartServer', async (restartTsServer: boolean = true) => { + if (restartTsServer) { + await vscode.commands.executeCommand('typescript.restartTsServer'); + } await client.stop(); outputChannel.clear(); client.clientOptions.initializationOptions = await getInitializationOptions(context, enabledHybridMode); await client.start(); nameCasing.activate(context, client, selectors); - if (restartTsServer) { - await vscode.commands.executeCommand('typescript.restartTsServer'); - } })); } }