on master help sign in
Remove TODO comment in helix_lsp::Registry::restart and add doc-comment on top of function instead
commit521cdec5a1a53c61d38ce5a1df85f82857f59149 authorPhilipp Mildenberger <philipp@mildenberger.me> dateWed 5 Apr 2023, 18:10 (4 years ago) parentdcb0767
1 file changed+3−2
helix-lsp/src/lib.rs+3−2
helix-lsp/src/lib.rs+3−2
@@ -680,6 +680,9 @@ impl Registry {
680680 Ok(client)
681681 }
682682
683+ /// 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,
684+ /// as it could be that language servers of these documents were stopped by this method.
685+ /// See [helix_view::editor::Editor::refresh_language_servers]
683686 pub fn restart(
684687 &mut self,
685688 language_config: &LanguageConfiguration,
@@ -707,8 +710,6 @@ impl Registry {
707710 .insert(name.clone(), vec![client.clone()])
708711 .unwrap();
709712
710− // TODO what if there are multiple instances for different workspaces?
711− // I think the language servers will be stopped without being restarted, which is not intended
712713 for old_client in old_clients {
713714 tokio::spawn(async move {
714715 let _ = old_client.force_shutdown().await;