VS Code
The httui-lang extension for VS Code bundles tree-sitter
highlight + the LSP server in one install. Works on .httui files
and on .md runbooks (fenced regions only).
Install
Section titled “Install”From the Marketplace
Section titled “From the Marketplace”- Open VS Code.
- Extensions panel (
Cmd+Shift+X). - Search “httui”.
- Install httui-lang (publisher:
httuicom).
Or from the command line:
code --install-extension httuicom.httui-langFrom a .vsix
Section titled “From a .vsix”If you want to side-load a pre-release:
- Download
httui-lang-<version>.vsixfrom Releases. - Extensions panel → ⋯ menu → Install from VSIX.
What you get
Section titled “What you get”- Syntax highlight for
.httuifiles (via TextMate grammar + tree-sitter when VS Code’s tree-sitter pipeline enables) - LSP: hover, completion, go-to-definition, diagnostics, rename
- Snippets:
http,db,expect→ expandable scaffolds - Run code lens at the top of each block (if the httui desktop
app is also running — sends a message to it via the
httui/blockRunextension)
Configuration
Section titled “Configuration”The extension reads vault config automatically when you open a
folder that looks like a vault (has .httui/, runbooks/,
connections.toml, or envs/).
Or set manually in settings.json:
{ "httui.vault": "/Users/you/runbooks", "httui.env": "staging", "httui.lspPath": "auto", "httui.runCodeLens": true, "httui.diagnosticsLevel": "warning"}| Setting | Default | Notes |
|---|---|---|
httui.vault | auto | Path to the active vault; auto = current workspace folder if it looks like a vault |
httui.env | from user.toml | Active environment for hover/resolution |
httui.lspPath | auto | Path to httui-lsp binary; auto = bundled with the extension |
httui.runCodeLens | true | Show “Run” lens above each block (no-op if desktop isn’t running) |
httui.diagnosticsLevel | warning | off, error, warning, info |
httui.format.onSave | false | Auto-format on save |
Commands
Section titled “Commands”Cmd+Shift+P then search:
| Command | Action |
|---|---|
httui: Set active environment… | Pick from envs/*.toml |
httui: Run block under cursor | Sends to httui desktop if running |
httui: Run all blocks in file | Same |
httui: Show resolved value | Pop-over with current resolution of {{ref}} under cursor |
httui: Open vault | Folder picker for vault path |
httui: Restart LSP server | When the LSP gets confused, faster than reloading window |
Keybindings
Section titled “Keybindings”Default bindings (override in keybindings.json):
| Action | macOS | Linux/Windows |
|---|---|---|
| Run block under cursor | Cmd+Shift+R | Ctrl+Shift+R |
| Show resolved value | Cmd+K Cmd+R | Ctrl+K Ctrl+R |
| Go to alias definition | F12 (standard go-to-def) | F12 |
Snippets
Section titled “Snippets”Type the trigger and press Tab:
| Trigger | Inserts |
|---|---|
http | HTTP block scaffold |
httpa | HTTP block with alias= |
httpexpect | HTTP block + # expect: section |
db | DB block scaffold |
expect | Just an # expect: section |
Markdown integration
Section titled “Markdown integration”When you open a .md file with httui fence blocks, the extension
injects httui language behaviour into the fenced regions:
- The fence’s body gets httui highlight + LSP
- Hover/completion/diagnostics work inside the fence
- Outside the fence, normal markdown behavior
No special config needed — the injection rules ship with the extension.
Troubleshooting
Section titled “Troubleshooting”LSP not starting
Section titled “LSP not starting”Check the Output panel → “httui-lang” channel. Most common:
| Symptom | Likely cause | Fix |
|---|---|---|
| ”Couldn’t find httui-lsp” | Bundled binary not extracted | Reinstall extension; or set httui.lspPath to a manually-installed binary |
| LSP starts then exits | Vault config error | Open connections.toml / envs/*.toml and check syntax |
| No completions | LSP started but vault not detected | Set httui.vault explicitly |
Tree-sitter highlight not working
Section titled “Tree-sitter highlight not working”VS Code’s tree-sitter pipeline is opt-in for some users. Fallback is TextMate (ships with the extension) — same colors, slightly less precise. To force tree-sitter:
{ "editor.experimental.useTreeSitter": true}LSP slow on large vaults
Section titled “LSP slow on large vaults”If you have >100 runbooks, hover/completion can lag on first open. Solution:
{ "httui.workspaceIndexing": "lazy"}Lazy mode indexes a runbook only when opened, vs eager (all on startup).
Related
Section titled “Related”- LSP capabilities — what the server provides
- Neovim setup — same LSP, different host
- Tree-sitter grammar — what powers highlight