HTX Guide · 1.5.0-alpha.2
Editor & LSP
VS Code extension, diagnostics, hover, and go-to-definition.
HTX 1.5.0-alpha.2 (reference implementation 0.3.0-alpha.3) — Features below are available in the
htxCLI unless noted as browser-only.
Configure htx-lsp and the VS Code extension for diagnostics, hover, and go-to-definition while you write HTX 1.5.0-alpha.1.
Architecture
htx-lsp runs on stdio via tower-lsp. It reuses htx-pipeline::analyze() — the same parse and transform path as the CLI.
Tree-sitter (tree-sitter-htx) provides syntax highlighting only. Semantics come from the Rust pipeline.
VS Code settings
| Setting | Default | Description |
|---|---|---|
htx.languageServer.enable |
true |
Start htx-lsp |
htx.languageServer.path |
auto | Path to htx-lsp binary |
htx.gfm |
false |
GFM preprocessing (shifts line numbers) |
htx.securityProfile |
trusted |
trusted | content-only | untrusted-data |
Position handling
AST loc fields use UTF-8 byte offsets. The LSP protocol uses UTF-16 code units at the boundary. See source locations and ADR-010.
Capabilities
- Publish diagnostics (HTX001–HTX014)
- Hover: diagnostic detail, tag registry schema, reference trust
- Go-to-definition:
(@id)→#idsymbol location - Document symbols: headings and
#idblocks
Build from source
The extension and language server build from the HTX repository:
git clone https://github.com/hypertoken/htx.git
cd htx
cargo build -p htx-lsp --release
The VS Code extension resolves the workspace binary, a bundled bin/ path, or PATH. Marketplace distribution with a bundled LSP binary is planned.
Related
- Diagnostic codes
- Semantic references
- What’s available — tooling status