Implement stop and start server commands

This commit is contained in:
Lukas Wirth 2022-10-17 15:43:15 +02:00
parent d68616a140
commit 0421756b42
4 changed files with 26 additions and 2 deletions

View file

@ -76,6 +76,14 @@ export async function createClient(
outputChannel,
middleware: {
workspace: {
// HACK: This is a workaround, when the client has been disposed, VSCode
// continues to emit events to the client and the default one for this event
// attempt to restart the client for no reason
async didChangeWatchedFile(event, next) {
if (client.isRunning()) {
await next(event);
}
},
async configuration(
params: lc.ConfigurationParams,
token: vscode.CancellationToken,