feat(diagnostics): add compiler-backed heml language service

Add hemx-lsp for stdio LSP diagnostics, completion, and hover while preserving HTML editor tooling for .heml files. Teach hemx-build to expose generated target and derive-known template context facts, including simple h-for locals, so editor help comes from build-owned facts instead of editor-only parsers. Wire VS Code/Cursor and Neovim documentation and extend the Workout exemplar with a real h-for plan loop for end-to-end proof.

req: diag/004

req: diag/005

req: diag/006
This commit is contained in:
slhx agent
2026-06-22 22:06:42 +02:00
parent 4bca046ed1
commit 797132647f
15 changed files with 1886 additions and 14 deletions
+2
View File
@@ -607,6 +607,7 @@ impl WorkoutEvent {
#[derive(Hemplate)]
pub struct Workout {
pub plan: Vec<ExercisePlan>,
pub next_action: String,
pub primary_action: String,
pub status: String,
@@ -664,6 +665,7 @@ pub fn view(state: &WorkoutState) -> Workout {
),
};
Workout {
plan: state.plan.clone(),
next_action: state.projection.next_action.clone(),
primary_action: state.projection.primary_action.clone(),
status: state.projection.progress.clone(),
+10
View File
@@ -6,6 +6,16 @@
<p class="session-status" data-hemx-slot="status">{+ self.status +}</p>
</section>
<section class="plan-card" aria-labelledby="plan-heading">
<h2 id="plan-heading">Today&apos;s plan</h2>
<ul>
<li h-for="exercise in &self.plan" h-key="exercise.name">
<span>{+ exercise.name +}</span>
<span>{+ exercise.target_sets +} × {+ exercise.reps +} @ {+ exercise.kg +}kg</span>
</li>
</ul>
</section>
<section class="action-rail" aria-label="Current workout action">
<button class="primary-action" type="button" data-hemx-handle="complete_set">
<span data-hemx-slot="primary_action">{+ self.primary_action +}</span>