From 3e4bac1d964cc29939b396a7e1e9ebd7feda5e0a Mon Sep 17 00:00:00 2001 From: Philipp Mildenberger Date: Sun, 2 Apr 2023 20:05:26 +0200 Subject: Fix lsp_restart across multiple different document scopes (language servers weren't restarted, if not of the same scope id), and fix some smaller rebase issues --- helix-term/src/commands/typed.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'helix-term/src/commands') diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs index 9ab2aa4f..706442e4 100644 --- a/helix-term/src/commands/typed.rs +++ b/helix-term/src/commands/typed.rs @@ -1404,7 +1404,6 @@ fn lsp_restart( .language_config() .context("LSP not defined for the current document")?; - let scope = config.scope.clone(); cx.editor.language_servers.restart( config, doc.path(), @@ -1417,7 +1416,16 @@ fn lsp_restart( .editor .documents() .filter_map(|doc| match doc.language_config() { - Some(config) if config.scope.eq(&scope) => Some(doc.id()), + Some(config) + if config.language_servers.iter().any(|ls| { + config + .language_servers + .iter() + .any(|restarted_ls| restarted_ls.name == ls.name) + }) => + { + Some(doc.id()) + } _ => None, }) .collect(); -- cgit v1.2.3-70-g09d2