2e55406a24
Add repo-owned hemplate highlighting fixture and golden capture contract without editor packaging or a second parser. req: diagnostics/004 req: diagnostics/008
40 lines
1.4 KiB
Markdown
40 lines
1.4 KiB
Markdown
---
|
|
id: SLICE-0011
|
|
type: slice
|
|
status: done
|
|
parent: NS-0003
|
|
title: Add hemplate highlighting fixtures and query tests
|
|
refs:
|
|
- docs/hemplate-syntax.md
|
|
- docs/editor-support.md
|
|
- REQUIREMENTS.md
|
|
---
|
|
|
|
## Objective
|
|
|
|
Create repo-owned highlighting fixtures that prove documented hemplate syntax receives stable captures while ordinary HTML remains handled by existing HTML tooling.
|
|
|
|
## Authority
|
|
|
|
`docs/hemplate-syntax.md` is the syntax authority; `docs/editor-support.md` says highlighting is HTML first with hemx overlays.
|
|
|
|
## Close when
|
|
|
|
- Fixtures cover text insertion, trusted HTML insertion, dynamic attributes, `h-if`, `h-for`, `h-key`, `h-match`, `h-case`, `data-hemx-root`, `data-hemx-slot`, `data-hemx-form`, and `data-hemx-handle`.
|
|
- Tests or golden outputs verify capture names for those tokens.
|
|
- The test path is repo-owned and does not require publishing a VS Code/Cursor/Neovim package.
|
|
|
|
## Verification
|
|
|
|
- `cargo test -p hemx-lsp`
|
|
- `workledger check`
|
|
|
|
## Non-goals
|
|
|
|
- Do not parse Rust expressions inside `{+ +}` beyond highlighting delimiters/expression region.
|
|
- Do not make highlights responsible for diagnostics or completion.
|
|
|
|
## Evidence
|
|
|
|
Done at commit `34327d6` follow-up and verified with `cargo test -p hemx-lsp`: `docs/fixtures/hemplate-highlighting/hemplate.heml` covers the documented overlay token classes and `captures.tsv` records the golden capture names without requiring editor package publishing or a second parser.
|