aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/health.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/health.rs')
-rw-r--r--helix-term/src/health.rs27
1 files changed, 19 insertions, 8 deletions
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index 480c2c67..031f982c 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -2,7 +2,10 @@ use crossterm::{
style::{Color, Print, Stylize},
tty::IsTty,
};
-use helix_core::config::{default_syntax_loader, user_syntax_loader};
+use helix_core::{
+ config::{default_syntax_loader, user_syntax_loader},
+ syntax::LanguageServerFeatureConfiguration,
+};
use helix_loader::grammar::load_runtime_file;
use helix_view::clipboard::get_clipboard_provider;
use std::io::Write;
@@ -192,10 +195,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(|lsp| {
+ syn_loader_conf
+ .language_server
+ .get(lsp.name())
+ .map(|config| config.command.clone())
+ });
check_binary(lsp);
let dap = lang.debugger.as_ref().map(|dap| dap.command.to_string());
@@ -264,11 +271,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(|lsp| {
+ syn_loader_conf
+ .language_server
+ .get(lsp.name())
+ .map(|config| config.command.clone())
+ }),
)?;
probe_protocol(