Login
View Ticket
Login
Ticket Hash: d1eed4b149d1361c747eab40976315314ce4c3a2
Title: LSP unit 1: stdio JSON-RPC transport + initialize/shutdown handshake (bin/ollama-codex lsp)
Status: Active Type: Feature_Request
Severity: Normal Priority: Medium
Subsystem: Resolution:
Last Modified: 2026-09-20 14:43:57
51.7 days ago
Created: 2026-07-07 23:17:51
126.4 days ago
Version Found In:
Description:
First unit of ticket 7d8c7145c436 (Crystal LSP server), deliberately tiny and self-contained. Add an `lsp` subcommand that speaks LSP base protocol on stdin/stdout: Content-Length framed JSON-RPC 2.0 messages. Handle exactly: `initialize` (reply with capabilities: definitionProvider true, hoverProvider true, textDocumentSync none for now), `initialized` (notification, no reply), `shutdown` (reply null), `exit` (terminate 0). Any other method: reply JSON-RPC error -32601 MethodNotFound. New file src/lsp_server.cr, wired into the CLI dispatch. Spec fakes an LSP client: write framed initialize/shutdown/exit bytes into an IO, run the server loop against it, assert the framed replies parse and capabilities are present. No definition/hover logic in this unit — the loop and framing only. fossil add the new files.