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,11 +19,13 @@ export function formatStatus(result: DoctorResult): string {
|
||||
const configStatus = systemInfo.configValid ? color.green("(valid)") : color.red("(invalid)")
|
||||
lines.push(` ${padding}Config ${configPath} ${configStatus}`)
|
||||
|
||||
const lspText = `LSP ${tools.lspInstalled}/${tools.lspTotal}`
|
||||
const serverCount = tools.lspServers.length
|
||||
const lspMark = formatStatusMark(serverCount > 0)
|
||||
const lspText = serverCount > 0 ? `${serverCount} server${serverCount === 1 ? "" : "s"}` : "none"
|
||||
const astGrepMark = formatStatusMark(tools.astGrepCli)
|
||||
const ghMark = formatStatusMark(tools.ghCli.installed && tools.ghCli.authenticated)
|
||||
const ghUser = tools.ghCli.username ?? ""
|
||||
lines.push(` ${padding}Tools ${lspText} · AST-Grep ${astGrepMark} · gh ${ghMark}${ghUser ? ` (${ghUser})` : ""}`)
|
||||
lines.push(` ${padding}Tools LSP ${lspMark} ${lspText} · AST-Grep ${astGrepMark} · gh ${ghMark}${ghUser ? ` (${ghUser})` : ""}`)
|
||||
|
||||
const builtinCount = tools.mcpBuiltin.length
|
||||
const userCount = tools.mcpUser.length
|
||||
|
||||
Reference in New Issue
Block a user