Expand description
Translation layer between MCP and LSP protocols.
This module handles the bidirectional conversion between MCP tool calls and LSP requests/responses.
Structs§
- Completion
- A completion item.
- Completions
Result - Result of a completions request.
- Definition
Result - Result of a definition request.
- Diagnostic
- A single diagnostic.
- Diagnostics
Result - Result of a diagnostics request.
- Document
Changes - Changes to a document.
- Document
State - State of a single document.
- Document
Symbols Result - Result of a document symbols request.
- Document
Tracker - Tracks document state across the workspace.
- Format
Document Result - Result of a format document request.
- Hover
Result - Result of a hover request.
- Location
- Location in a document.
- Position2D
- Position in a document (1-based for MCP).
- Range
- Range in a document (1-based for MCP).
- References
Result - Result of a references request.
- Rename
Result - Result of a rename request.
- Symbol
- A document symbol.
- Text
Edit - A text edit operation.
- Translator
- Translator handles MCP tool calls by converting them to LSP requests.
Enums§
- Diagnostic
Severity - Diagnostic severity.
- Position
Encoding - Supported position encodings per LSP 3.17.
Functions§
- lsp_
to_ mcp_ position - Convert LSP position (0-based) to MCP position (1-based).
- mcp_
to_ lsp_ position - Convert MCP position (1-based) to LSP position (0-based).