diff options
author | Philipp Mildenberger | 2023-04-02 18:05:26 +0000 |
---|---|---|
committer | Philipp Mildenberger | 2023-05-18 19:58:17 +0000 |
commit | 3e4bac1d964cc29939b396a7e1e9ebd7feda5e0a (patch) | |
tree | d3c244987de564ebe913891d9abfcbeceee21c07 /helix-term | |
parent | 2a21b939c432e4b5a186df780a1e97d20ff53120 (diff) |
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
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/commands/typed.rs | 12 |
1 files changed, 10 insertions, 2 deletions
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(); |