# Handling of LSP server quirks and root selection Status: accepted ## Context Language servers behave inconsistently: some send `workspace/configuration` requests expecting an array of results; the rustup `rust-analyzer` proxy exits immediately when the component is not installed; servers still indexing answer requests with -32801 (ContentModified) or -32802 (ServerCancelled). Rust and TypeScript workspaces have nested markers (inner Cargo.toml / package.json), but servers must be started at the workspace root. ## Decision - Server requests: `workspace/configuration` gets an array of nulls sized to the request; all other server requests get a null result. - A server that exits immediately (rustup proxy without component) is treated as not installed, not as a crash. - Requests failing with -32801/-32802 are retried briefly, since the server is still indexing. - Root resolution for rust/ts keeps climbing to the outermost marker below the stop dir; the outermost Cargo.toml wins (workspace root); with no marker the workspace root is used. - A fake rust-analyzer test models that the first (empty) publish after a change must not be taken as the result. ## Consequences Servers are keyed by (language, outermost root), so one server serves a whole workspace. Retries add bounded latency. Code: crates/hx-lens/src/lsp.rs (server request handler), crates/hx-lens/src/manager.rs (start, request, root detection, fake rust-analyzer test)