df0fabd4fb
Add repo-local northstars and ready slices for testing strategy, LSP/editor completion, and hemplate highlighting boundaries.
44 lines
1.3 KiB
Markdown
44 lines
1.3 KiB
Markdown
---
|
|
id: SLICE-0005
|
|
type: slice
|
|
status: ready
|
|
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
|
|
|
|
`hemx-lsp/src/main.rs` already has diagnostics CLI and LSP publish paths that can be covered with protocol tests.
|