fix: Fix restart server button trying to start instead of restart the server

This commit is contained in:
Lukas Wirth 2023-04-28 21:34:31 +02:00
parent 3b97978c49
commit cf8f13b531
5 changed files with 9 additions and 10 deletions

View file

@ -120,13 +120,11 @@ function createCommands(): Record<string, CommandFactory> {
enabled: commands.onEnter,
disabled: (_) => () => vscode.commands.executeCommand("default:type", { text: "\n" }),
},
reload: {
restartServer: {
enabled: (ctx) => async () => {
void vscode.window.showInformationMessage("Reloading rust-analyzer...");
await ctx.restart();
},
disabled: (ctx) => async () => {
void vscode.window.showInformationMessage("Reloading rust-analyzer...");
await ctx.start();
},
},