diff options
| author | Lukas Wirth <lukastw97@gmail.com> | 2022-10-17 15:43:15 +0200 |
|---|---|---|
| committer | Lukas Wirth <lukastw97@gmail.com> | 2022-10-17 15:45:57 +0200 |
| commit | 0421756b4256b8edf739b5889e754d7bc733ed38 (patch) | |
| tree | 829aef24fb671930e5e6f49acc149e36e68c3181 /editors/code/src/client.ts | |
| parent | d68616a140b35dd9bc4e2982e0993257ab0942e0 (diff) | |
| download | rust-0421756b4256b8edf739b5889e754d7bc733ed38.tar.gz rust-0421756b4256b8edf739b5889e754d7bc733ed38.zip | |
Implement stop and start server commands
Diffstat (limited to 'editors/code/src/client.ts')
| -rw-r--r-- | editors/code/src/client.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts index 3408a2ee84e..fb667619c86 100644 --- a/editors/code/src/client.ts +++ b/editors/code/src/client.ts @@ -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, |
