Skip to content

Commit

Permalink
Remove TODO comment in helix_lsp::Registry::restart and add doc-comme…
Browse files Browse the repository at this point in the history
…nt on top of function instead
  • Loading branch information
Philipp-M committed May 18, 2023
1 parent dcb0767 commit 521cdec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions helix-lsp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,9 @@ impl Registry {
Ok(client)
}

/// If this method is called, all documents that have a reference to language servers used by the language config have to refresh their language servers,
/// as it could be that language servers of these documents were stopped by this method.
/// See [helix_view::editor::Editor::refresh_language_servers]
pub fn restart(
&mut self,
language_config: &LanguageConfiguration,
Expand Down Expand Up @@ -707,8 +710,6 @@ impl Registry {
.insert(name.clone(), vec![client.clone()])
.unwrap();

// TODO what if there are multiple instances for different workspaces?
// I think the language servers will be stopped without being restarted, which is not intended
for old_client in old_clients {
tokio::spawn(async move {
let _ = old_client.force_shutdown().await;
Expand Down

0 comments on commit 521cdec

Please sign in to comment.