Skip to content

chimera.lsp

chimera.lsp provides a stdlib-only LSP client so tools can ask a language server for diagnostics, completions, hovers, and renames.

from chimera.lsp import (
LSPClient,
LSPSession,
LSPManager,
LSPTool,
)
SymbolModulePurpose
LSPClientchimera.lsp.baseJSON-RPC client over server stdio. Methods: initialize, did_open, definition, references, rename, diagnostics, completion, hover.
LSPSessionchimera.lsp.sessionOne server’s lifecycle (initialize → requests → shutdown).
LSPManagerchimera.lsp.managerRegistry of LSPSession keyed by language id; routes requests to the right server.
LSPToolchimera.lsp.toolBaseTool wrapper exposing definition_lookup, find_references, rename_symbol to the agent.

Per-language launch configurations: pylsp (Python), typescript-language-server (TS/JS), rust-analyzer (Rust), gopls (Go), clangd (C/C++).

  • chimera.toolsdefinition_lookup is the tool-level surface that wraps LSPTool.