Skip to content

Commit

Permalink
fix(vscode): restart tsserver before restart vue language server
Browse files Browse the repository at this point in the history
close #4242
  • Loading branch information
johnsoncodehk committed Apr 10, 2024
1 parent d46b635 commit 32b7c72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/vscode/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}));
}
}
Expand Down

0 comments on commit 32b7c72

Please sign in to comment.