lspeasy / core/src / discoverServerByLanguageId
Function: discoverServerByLanguageId()
ts
function discoverServerByLanguageId(root, languageId): ResolvedServer | null;Defined in: packages/core/src/discover.ts:187
Resolve an LSP server for a language ID by walking up from root to the filesystem root then falling back to the global user config.
Parameters
| Parameter | Type |
|---|---|
root | string |
languageId | string |
Returns
ResolvedServer | null
Never
Returns null silently when no matching entry is found. The proxy daemon's BackendPool calls this function on every new language connection — if lsp.json is absent or omits the requested language, the daemon starts successfully but throws "No LSP server configured for languageId" the moment a client request arrives. An lsp.json must be present in the workspace (or at ~/.claude/lsp.json) before the proxy server can serve any language.