f605c9ee74
Update workledger status for completed diagnostics, completion, hover, and protocol LSP slices.
41 lines
1.6 KiB
Markdown
41 lines
1.6 KiB
Markdown
---
|
|
id: SLICE-0006
|
|
type: slice
|
|
status: done
|
|
parent: NS-0002
|
|
title: Complete context-aware hemplate completions
|
|
refs:
|
|
- REQUIREMENTS.md
|
|
- docs/editor-support.md
|
|
- docs/hemplate-syntax.md
|
|
- hemx-lsp/src/main.rs
|
|
---
|
|
|
|
## Objective
|
|
|
|
Make completion useful for the real hemplate surface: directives, dynamic attributes, and `data-hemx-*` facts should complete in context without inventing syntax.
|
|
|
|
## Authority
|
|
|
|
`docs/hemplate-syntax.md` defines the public syntax; `docs/editor-support.md` and `REQUIREMENTS.md` `diagnostics/006` require completions to support that surface while remaining subordinate to build validation.
|
|
|
|
## Close when
|
|
|
|
- Completion items cover `h-if`, `h-for`, `h-key`, `h-match`, `h-case`, `{+ +}`, `{+= =+}`, `+attr`, and known `data-hemx-*` authoring facts.
|
|
- Tests prove context filters: directive completions in tag attributes, snippet/text completions in text positions, and no irrelevant completions inside quoted Rust expressions.
|
|
- Completion docs/details point to the existing syntax docs rather than new invented rules.
|
|
|
|
## Verification
|
|
|
|
- `cargo test -p hemx-lsp`
|
|
- Manual check if needed: request `textDocument/completion` against a fixture through the LSP test harness.
|
|
|
|
## Non-goals
|
|
|
|
- Do not add Rust type inference or project-wide symbol completion in this slice.
|
|
- Do not make completion acceptance a build authority.
|
|
|
|
## Evidence
|
|
|
|
Done at commit `baf4b15` and verified again at `38794cf` with `cargo test -p hemx-lsp`: completion tests cover documented hemplate directives, dynamic attributes, expression snippets, `data-hemx-root`, `data-hemx-slot`, `data-hemx-form`, and `data-hemx-handle` through helper and protocol paths.
|