From 91429f6359e484df5452e2c9a661a0c24af6dfbc Mon Sep 17 00:00:00 2001 From: Sam Rees Date: Thu, 17 Aug 2023 19:51:39 +0100 Subject: [PATCH 1/3] Initial commit --- helix-term/src/health.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs index 8f92187778be..06f44d764ab2 100644 --- a/helix-term/src/health.rs +++ b/helix-term/src/health.rs @@ -145,7 +145,7 @@ pub fn languages_all() -> std::io::Result<()> { } }; - let mut headings = vec!["Language", "LSP", "DAP"]; + let mut headings = vec!["Language", "LSP", "DAP", "Formatter"]; for feat in TsFeature::all() { headings.push(feat.short_title()) @@ -205,6 +205,12 @@ pub fn languages_all() -> std::io::Result<()> { let dap = lang.debugger.as_ref().map(|dap| dap.command.to_string()); check_binary(dap); + let formatter = lang + .formatter + .as_ref() + .map(|formatter| formatter.command.to_string()); + check_binary(formatter); + for ts_feat in TsFeature::all() { match load_runtime_file(&lang.language_id, ts_feat.runtime_filename()).is_ok() { true => column("✓", Color::Green), @@ -279,6 +285,13 @@ pub fn language(lang_str: String) -> std::io::Result<()> { }), )?; + probe_protocol( + "formatter", + lang.formatter + .as_ref() + .map(|formatter| formatter.command.to_string()), + )?; + probe_protocol( "debug adapter", lang.debugger.as_ref().map(|dap| dap.command.to_string()), From a093a2d8cb42b40980ff26c5d1fdc431bf5f07ba Mon Sep 17 00:00:00 2001 From: Sam Rees Date: Thu, 21 Dec 2023 15:34:16 +0000 Subject: [PATCH 2/3] moved formatter to after debug adapter --- helix-term/src/health.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs index 06f44d764ab2..67a26b02a7ff 100644 --- a/helix-term/src/health.rs +++ b/helix-term/src/health.rs @@ -285,6 +285,11 @@ pub fn language(lang_str: String) -> std::io::Result<()> { }), )?; + probe_protocol( + "debug adapter", + lang.debugger.as_ref().map(|dap| dap.command.to_string()), + )?; + probe_protocol( "formatter", lang.formatter @@ -292,11 +297,6 @@ pub fn language(lang_str: String) -> std::io::Result<()> { .map(|formatter| formatter.command.to_string()), )?; - probe_protocol( - "debug adapter", - lang.debugger.as_ref().map(|dap| dap.command.to_string()), - )?; - for ts_feat in TsFeature::all() { probe_treesitter_feature(&lang_str, *ts_feat)? } From 887813bd07283d0849537f3f4fbcccad3a92dfe1 Mon Sep 17 00:00:00 2001 From: Sam Rees Date: Thu, 21 Dec 2023 16:05:04 +0000 Subject: [PATCH 3/3] fixed post sync with master --- helix-term/src/health.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs index 6350c304819d..44ae2a2f780b 100644 --- a/helix-term/src/health.rs +++ b/helix-term/src/health.rs @@ -206,7 +206,7 @@ pub fn languages_all() -> std::io::Result<()> { let formatter = lang .formatter .as_ref() - .map(|formatter| formatter.command.to_string()); + .map(|formatter| formatter.command.as_str()); check_binary(formatter); for ts_feat in TsFeature::all() {