refactor(doctor): show detected LSP servers and extensions instead of hardcoded counts

Replace the hardcoded 4-server list in doctor LSP check with getAllServers()
from server-resolution.ts, which covers all 40+ builtin servers plus user
config. Output now shows server count with supported extensions, and verbose
mode expands to per-server detail lines.

Status:  LSP 3 servers (.go, .py, .pyi, .ts, .tsx)
Verbose: LSP 3 servers (.go, .py, .pyi, .ts, .tsx)
           typescript (.ts, .tsx, .js, .jsx)
           pyright (.py, .pyi)
           gopls (.go)

Closes #2587
This commit is contained in:
acamq
2026-03-15 18:39:56 -06:00
parent 5073efef48
commit 03da2e94a2
8 changed files with 32 additions and 41 deletions
+5 -3
View File
@@ -19,8 +19,10 @@ function createDoctorResult(): DoctorResult {
isLocalDev: false,
},
tools: {
lspInstalled: 2,
lspTotal: 4,
lspServers: [
{ id: "typescript", extensions: [".ts", ".tsx", ".js", ".jsx"] },
{ id: "pyright", extensions: [".py", ".pyi"] },
],
astGrepCli: true,
astGrepNapi: false,
commentChecker: true,
@@ -102,7 +104,7 @@ describe("formatDoctorOutput", () => {
const output = stripAnsi(formatDoctorOutput(result, "status"))
//#then
expect(output).toContain("LSP 2/4")
expect(output).toContain("LSP")
expect(output).toContain("context7")
})
})