Repository: helix-editor/helix (language: rust)

Issue:
`--health all` only displays the first of multiple configured language servers
### Summary

After upgrading to 25.01 i experienced the following issue:

I use a cutom `languages.toml` i.e. for helix-gpt

```
[language-server.gpt]
command = "helix-gpt"

[language-server.ts]
command = "typescript-language-server"
args = ["--stdio"]
language-id = "javascript"

[[language]]
name = "typescript"
language-servers = [
    "ts",
    "gpt"
]

[[language]]
name = "go"
language-servers = [
    "gpt",
    "gopls"
]

...
```

**Only the first defined language server becomes effective:**

**25.01** `hx --health`:

![image](https://github.com/user-attachments/assets/582698f3-7cfd-4d87-b854-909c8fe306c3)

![image](https://github.com/user-attachments/assets/eb891248-ee35-4b43-9d24-c74800244674)

![image](https://github.com/user-attachments/assets/fc82d3c8-1a85-4b43-8f59-089b2100af5d)

before:

**24.07** `hx --health`:

![image](https://github.com/user-attachments/assets/e7263634-fd13-4961-9874-168b0196f3d2)

![image](https://github.com/user-attachments/assets/f4c05077-9919-4b46-9396-c3b2a12533ee)

![image](https://github.com/user-attachments/assets/c7942e33-092c-4dc4-a43e-b2a5b7ad57d1)


### Reproduction Steps

_No response_

### Helix log

_No response_

### Platform

Linux

### Terminal Emulator

ghostty

### Installation Method

realease page

### Helix Version

helix 25.01


Discussion / hints:
If you do `hx --health go` does it still show all LSPs for you?
> If you do `hx --health go` does it still show all LSPs for you?

No it only shows the first one with `hx --health` as shown in the screenshot.  `languages.toml` was untouched between 24.07 and 25.01.
I also noticed that with `hx --health` in 25.01 all languages  that have more than 1 default suupported language server, now only show the first one, but an empty line for the second one:

![image](https://github.com/user-attachments/assets/5f18351e-4085-49e6-85d0-2350cfd78c0f)

Markdown should, for example, also have `markdown-oxide` as default.

`--health` takes an optional parameter of a language `name`. For instance just `--health` alone also shows me one LSP for `markdown`, but when I pass it the name, `--health markdown`:

```shell
hx --health markdown
Configured language servers:
  ✓ typos-lsp: ...\bin\typos-lsp.exe
  ✓ harper-ls: ...\bin\harper-ls.exe
  ✓ marksman: ...\scoop\shims\marksman.exe
  ✓ markdown-oxide: ...\bin\markdown-oxide.exe
Configured debug adapter: None
Configured formatter: None
Tree-sitter parser: ✓
Highlight queries: ✓
Textobject queries: ✘
Indent queries: ✘
```
The missing display for multiple language servers in `hx --health` is most likely a regression from #12355 
OK, thank you, it seems just a display issue. The problems that I was facing were originated in the `helix-gpt` language server itself, so that together with the display issue, I wrongly assumed it was only taking using the first language server into account. I think it can be closed.

```
❯ hx --health typescript
Configured language servers:
  ✓ typescript-language-server: /usr/local/bin/typescript-language-server
  ✓ helix-gpt: /usr/bin/helix-gpt
Configured debug adapter: None
Configured formatter: None
Tree-sitter parser: ✓
Highlight queries: ✓
Textobject queries: ✓
Indent queries: ✓
```

I'll update the title since the display is an outstanding bug

Fix patch:
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index faf632d8731c..05e2f9c7e07f 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -224,8 +224,7 @@ pub fn languages_all() -> std::io::Result<()> {
 
         for cmd in cmds {
             write!(stdout, "{}", fit(""))?;
-            check_binary(Some(cmd));
-            writeln!(stdout)?;
+            writeln!(stdout, "{}", check_binary(Some(cmd)))?;
         }
     }
 


Test patch: