797132647f
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
1.1 KiB
1.1 KiB
Hemx HEML for VS Code and Cursor
This extension keeps .heml files in VS Code's HTML language mode and layers the
shared hemx-lsp service on top for diagnostics, completion, and hover. It does
not define a separate grammar, formatter, selector model, or editor-only parser.
req: diagnostics/004 req: diagnostics/005
Run from a hemx checkout
Open the repository in VS Code/Cursor and use this extension from source. The
extension detects hemx-lsp/Cargo.toml at the workspace root and starts:
cargo run -p hemx-lsp -- lsp
Run with an installed binary
Install the shared service and open any app workspace:
cargo install --path hemx-lsp
The extension then starts:
hemx-lsp lsp
If your binary lives elsewhere, set hemx.heml.lspCommand and
hemx.heml.lspArgs in VS Code/Cursor settings.
Behavior
.hemldefaults to VS Code'shtmllanguage mode.- Diagnostics are displayed from
hemx-buildviahemx-lsp. - Completion and hover come from
hemx-lspanddocs/hemplate-syntax.md. - If the language service cannot start, normal HTML highlighting still works.