A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/microsoft/vscode/issues/48309 below:

Documentation on LanguageClient lifecycle · Issue #48309 · microsoft/vscode · GitHub

I've been looking for documentation on LanguageClient, but can't find any either in the source or online (there's lots of information on the language server, but not so much about using LanguageClient in the extension. In particular I'm looking for documentation on when/if I should be calling stop or other lifecycle functions.

My motivation here is to properly handle the language server restarting. I run the extension which starts the language server (the Rust Language Server). If I then kill the language server process, then the language server is restarted. However, I'm not clear what happens to the language client or the extension itself - I don't know if there hooks where I'm meant to handle stopping the client.

What happens is that the new language server gets two of every message, so it seems like there are now two clients sending messages to the same server (and if I keep killing the language server, I get n+1 messages after n restarts). I assume this is because I'm not handling something in the extension, but it could be a bug in VSCode itself.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4