mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-06 16:14:49 +08:00
Add LspRegistry in crates/runtime/src/lsp_client.rs and wire it into run_lsp() tool handler in crates/tools/src/lib.rs. Runtime additions: - LspRegistry: register/get servers by language, find server by file extension, manage diagnostics, dispatch LSP actions - LspAction enum (Diagnostics/Hover/Definition/References/Completion/Symbols/Format) - LspServerStatus enum (Connected/Disconnected/Starting/Error) - Diagnostic/Location/Hover/CompletionItem/Symbol types for structured responses - Action dispatch validates server status and path requirements Tool wiring: - run_lsp() maps LspInput to LspRegistry.dispatch() - Supports dynamic server lookup by file extension (rust/ts/js/py/go/java/c/cpp/rb/lua) - Caches diagnostics across servers 8 new tests covering registration, lookup, diagnostics, and dispatch paths. Bridges to existing LSP process manager for actual JSON-RPC execution.