lspeasy / core/src / discoverServer
Function: discoverServer()
ts
function discoverServer(root, fileExt): ResolvedServer | null;Defined in: packages/core/src/discover.ts:170
Resolve an LSP server for a file extension by walking up from root to the filesystem root then falling back to the global user config.
Parameters
| Parameter | Type |
|---|---|
root | string |
fileExt | string |
Returns
ResolvedServer | null
Never
Returns null silently when no lsp.json is found anywhere in the search path (including the global ~/.claude/lsp.json fallback). Callers that skip the null check will silently fail to resolve a server command — for the CLI this means lsproxy exits before the proxy daemon is ever spawned. Create an lsp.json at the workspace root or at ~/.claude/lsp.json for a per-user fallback.