Repository navigation
LSP UX (Future)
Joe Curlee (w4ffl35) edited this page Jan 27, 2026
·
2 revisions
This document specifies UX goals for LSP enhancements beyond the MVP.
- Surface contract/refinement expectations at call sites.
- Surface solver models / counterexamples when verification fails.
- Keep diagnostics actionable and span-accurate.
When: On textDocument/hover (or dedicated textDocument/codeLens) for function calls.
Content:
- Callee signature and required
requiresclauses. - Refinement constraints on parameters.
- A short, human-readable summary of obligations the caller must satisfy.
Example hover content:
requires denominator != 0
ensures result * denominator == numerator
When: On verification failures (diagnostics).
Content:
- Include a short “model” section with relevant variable bindings.
- Keep the model minimal and focused on user-facing names.
Example diagnostic note:
model:
denominator = 0
numerator = 10
- Never hide solver failures; always report as errors.
- Keep the output deterministic and stable across runs.
- Ensure all hints map to precise spans.
- Use a parser/lexer fuzzer to stress error recovery and diagnostics.
- Track minimal crash inputs and turn them into regression fixtures.