Users can now drop a .pi-lsp.json at any ancestor of their working
files to add new LSP servers, override built-in ones, or disable
servers entirely. The nearest config (walking upward) wins.
- New src/config.ts: walks upward for .pi-lsp.json, parses, and
merges with the built-in registry. Cached per config-file path
with mtime invalidation. Falls back to built-ins on parse error.
- Merge rules: matching id shallow-merges (user wins); new id
appends (must include match/command/args/rootMarkers); `disable`
filters at the end.
- src/root.ts: pickServer() now resolves servers via the per-repo
registry. Adds findServerById(filePath, id) and re-exports
getServersForPath() for callers.
- src/daemon.ts: getOrCreateEntry() resolves serverId against the
filePath's config so spawned servers reflect repo overrides.
- index.ts and cli.ts: replace direct `servers` imports with
path-aware getServersForPath() lookups.
- Tests: 9 new unit tests covering merge semantics, walk-up
discovery, mtime invalidation, and graceful fallback.
- Docs: README "Per-Repo Config" section + AGENTS.md updates.
Add diagnosticsOnly?: boolean to ServerConfig. When set, the server is
excluded from pickServer() (hover/definition/references/completion/
documentSymbol) but still included in pickDiagnosticServers() for
lsp_diagnostics and auto-check.
Mark oxlint as diagnosticsOnly: true — it now contributes diagnostics
alongside typescript-language-server without interfering with navigation
or completion tools.
Extract isOnPath() to shared src/util.ts so both the daemon (client.ts)
and extension (root.ts) can use it. Add isServerAvailable() with a
per-process cache to pickServer(), skipping servers whose binary isn't
on PATH before sending requests to the daemon.
This avoids wasted daemon round-trips for missing binaries and sets up
for upcoming multi-server diagnostics fan-out.