Expand description
oxicode-lsp — Thin LSP protocol adapter.
This crate wraps async_lsp + lsp_types + async_process
to provide a single LspClient that owns a language server
process and a JSON-RPC correlation loop. It does not do:
- config discovery / layering (user > project > plugin)
- folder-trust gating (project
lsp.jsonskipped in untrusted folders) - crash recovery / lifetime restart budget
- multi-server lifecycle / extension conflict resolution
Those concerns belong in oxicode-cli's LSP adapter (see
oxicode-cli/src/lsp/manager.rs). Keeping oxicode-lsp thin lets the
adapter own policy without re-implementing the JSON-RPC loop.
§Pattern
Ported from grok’s LspManager (see
docs/designs/2026-07-18-stub-completion.md §2): a single
LspClient per server, with diagnostics_ready: Arc<Notify>
gating drain_diagnostics, and lifecycle_id: AtomicU64 marking
restart epochs so cached diagnostics from a dead epoch can be
evicted.
Structs§
- LspClient
- One process-spawned language server.
- LspClient
Config - Process-handle and runtime knobs for one LSP server.
- Published
Diagnostics - Per-file
textDocument/publishDiagnosticssnapshot. - Replay
State - Tracked-document replay helper used by
oxicode-cli'srestart monitor.
Enums§
- Async
LspError - Possible errors.
- LspError
- Crate-wide error type.
Constants§
- REQUEST_
TIMEOUT - Default timeout for an individual
request → responseRPC.
Functions§
- uri_for
- Helper: build a
file://URI from a path.