Skip to main content

Module server

Module server 

Source
Expand description

LSP server implementation โ€” JSON-RPC over stdin/stdout (P1.3).

Structsยง

LspServer
The LSP server state.

Functionsยง

diagnostic_to_lsp
Diagnostic to LSP form.
diagnostic_to_lsp_with_src
Convert a vibe Diagnostic to an LSP diagnostic JSON value (with source text for exact line/col).
encode_message
LSP message framing: Content-Length header + blank line + JSON body.
get_diagnostics
Get diagnostics for a VibeScript source string.
offset_to_position
Convert a byte offset to an LSP (0-based line, 0-based character) position.
read_message
Read one LSP message from the reader. Returns None on EOF.
severity_for_code ๐Ÿ”’
Map a DiagCode to an LSP severity (1=Error, 2=Warning, 3=Info, 4=Hint).