summaryrefslogtreecommitdiff
path: root/helix-term/src/health.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2023-05-19 00:39:35 +0000
committerGitHub2023-05-19 00:39:35 +0000
commit53f47bc47771c94dab51626ca025be28e62eba0c (patch)
treec8f5c59d40d1ecde227c209f898cc7afd6da5477 /helix-term/src/health.rs
parent7f5940be80eaa3aec7903903072b7108f41dd97b (diff)
parent2a512f7c487f0a707a7eb158e24bd478433bcd91 (diff)
Merge pull request #2507 from Philipp-M/multiple-language-servers
Add support for multiple language servers per language
Diffstat (limited to 'helix-term/src/health.rs')
-rw-r--r--helix-term/src/health.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index 480c2c67..8f921877 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -192,10 +192,14 @@ pub fn languages_all() -> std::io::Result<()> {
for lang in &syn_loader_conf.language {
column(&lang.language_id, Color::Reset);
- let lsp = lang
- .language_server
- .as_ref()
- .map(|lsp| lsp.command.to_string());
+ // TODO multiple language servers (check binary for each supported language server, not just the first)
+
+ let lsp = lang.language_servers.first().and_then(|ls| {
+ syn_loader_conf
+ .language_server
+ .get(&ls.name)
+ .map(|config| config.command.clone())
+ });
check_binary(lsp);
let dap = lang.debugger.as_ref().map(|dap| dap.command.to_string());
@@ -264,11 +268,15 @@ pub fn language(lang_str: String) -> std::io::Result<()> {
}
};
+ // TODO multiple language servers
probe_protocol(
"language server",
- lang.language_server
- .as_ref()
- .map(|lsp| lsp.command.to_string()),
+ lang.language_servers.first().and_then(|ls| {
+ syn_loader_conf
+ .language_server
+ .get(&ls.name)
+ .map(|config| config.command.clone())
+ }),
)?;
probe_protocol(