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:
@@ -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")
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user