Skip to main content

Module lsp

Module lsp 

Source
Expand description

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ EXTENSION — NO vendor/ COUNTERPART. Language Server Protocol (stdio) for editors — vimlrs --lsp. Self-contained, reusing the synthesis lexer/parser: diagnostics come from per-line crate::viml_parser::parse_stmt; completion / hover draw on the Phase-3 builtin set, the ex-command words, and the predefined v: constants. No output reaches the terminal — JSON-RPC on stdio only. Structure ported from awkrs’s lsp.rs. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Functions§

completion_words
Flat, sorted, deduped list of every completion word — the union of the four completion sources (BUILTIN_DOCS names, EX_COMMANDS, V_VARS, and the parser’s PHASE3_BUILTINS). This is the single source of truth for bare names; the LSP’s [completions] enriches the same union with signatures/docs/kinds, while the interactive REPL (crate::repl) feeds this flat list straight into its completion menu. Keeping both on this union means the editor and the REPL always offer the same surface.
run_stdio
Entry point for vimlrs --lsp. Serves JSON-RPC on stdio until shutdown.