Files
hemx/work/slices/SLICE-0005-lsp-diagnostics-parity.md
slhx agent f605c9ee74 docs(work): mark completed lsp slices
Update workledger status for completed diagnostics, completion, hover, and protocol LSP slices.
2026-06-26 00:10:55 +02:00

44 lines
1.5 KiB
Markdown

---
id: SLICE-0005
type: slice
status: done
parent: NS-0002
title: Prove LSP diagnostics parity with hemx-build
refs:
- REQUIREMENTS.md
- docs/diagnostics.md
- docs/editor-support.md
- hemx-lsp/src/main.rs
- hemx-build/src/lib.rs
---
## Objective
Make LSP diagnostics a faithful editor transport for `hemx-build` diagnostics across open, change, save, close, and CLI file checks.
## Authority
`docs/diagnostics.md` and `REQUIREMENTS.md` `diagnostics/004`, `diagnostics/005`, and `check/001` require editor overlays to share compiler authority and preserve useful spans.
## Close when
- A focused LSP test opens an invalid `.heml` document and observes the same diagnostic code/severity/range as the `hemx-lsp diagnostics FILE.heml` path.
- `didChange` updates diagnostics from in-memory text.
- `didSave` with and without text uses the documented source of truth.
- `didClose` clears diagnostics.
## Verification
- `cargo test -p hemx-lsp`
- `cargo run -p hemx-lsp -- diagnostics <fixture>.heml`
- `cargo check --workspace` if public LSP/build types change.
## Non-goals
- Do not implement a second `.heml` parser in the LSP.
- Do not add provider-specific VS Code/Neovim behavior in this slice.
## Evidence
Done at commits `6cf800c` and verified again at `38794cf` with `cargo test -p hemx-lsp`: protocol tests cover build-equivalent diagnostics publishing on `didOpen`/`didSave`, clearing on `didChange`/`didClose`, and file-backed `didSave` without in-memory text.