A language server would let editors show inline errors, hover types, and eventually go-to-definition and completion for `.laz` files. The compiler already has what it needs: parser error recovery, a typechecker, and a `--check` mode that outputs JSON errors.
Planned as a separate `lazarus-lsp/` project that reuses the compiler frontend. Priority order for features:
- Diagnostics — inline errors on save (the `--check` mode already does the hard part)
- Hover types — show the inferred type of the expression under the cursor
- Go-to-definition — jump to where a class, method, or variable is declared
- Completion — members after `.`, class names in import statements
- Find references, rename, format, code actions — later
The main prerequisite inside the compiler is storing the inferred type back on each AST node during typecheck, so the LSP can read it without re-running the full pipeline.
Communicates over stdin/stdout with JSON-RPC 2.0, which means `std.Json` needs to land first.
A language server would let editors show inline errors, hover types, and eventually go-to-definition and completion for `.laz` files. The compiler already has what it needs: parser error recovery, a typechecker, and a `--check` mode that outputs JSON errors.
Planned as a separate `lazarus-lsp/` project that reuses the compiler frontend. Priority order for features:
The main prerequisite inside the compiler is storing the inferred type back on each AST node during typecheck, so the LSP can read it without re-running the full pipeline.
Communicates over stdin/stdout with JSON-RPC 2.0, which means `std.Json` needs to land first.