Skip to content

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).

  1. Open VS Code.
  2. Extensions panel (Cmd+Shift+X).
  3. Search “httui”.
  4. Install httui-lang (publisher: httuicom).

Or from the command line:

Terminal window
code --install-extension httuicom.httui-lang

If you want to side-load a pre-release:

  1. Download httui-lang-<version>.vsix from Releases.
  2. Extensions panel → ⋯ menu → Install from VSIX.
  • Syntax highlight for .httui files (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/blockRun extension)

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"
}
SettingDefaultNotes
httui.vaultautoPath to the active vault; auto = current workspace folder if it looks like a vault
httui.envfrom user.tomlActive environment for hover/resolution
httui.lspPathautoPath to httui-lsp binary; auto = bundled with the extension
httui.runCodeLenstrueShow “Run” lens above each block (no-op if desktop isn’t running)
httui.diagnosticsLevelwarningoff, error, warning, info
httui.format.onSavefalseAuto-format on save

Cmd+Shift+P then search:

CommandAction
httui: Set active environment…Pick from envs/*.toml
httui: Run block under cursorSends to httui desktop if running
httui: Run all blocks in fileSame
httui: Show resolved valuePop-over with current resolution of {{ref}} under cursor
httui: Open vaultFolder picker for vault path
httui: Restart LSP serverWhen the LSP gets confused, faster than reloading window

Default bindings (override in keybindings.json):

ActionmacOSLinux/Windows
Run block under cursorCmd+Shift+RCtrl+Shift+R
Show resolved valueCmd+K Cmd+RCtrl+K Ctrl+R
Go to alias definitionF12 (standard go-to-def)F12

Type the trigger and press Tab:

TriggerInserts
httpHTTP block scaffold
httpaHTTP block with alias=
httpexpectHTTP block + # expect: section
dbDB block scaffold
expectJust an # expect: section

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.

Check the Output panel → “httui-lang” channel. Most common:

SymptomLikely causeFix
”Couldn’t find httui-lsp”Bundled binary not extractedReinstall extension; or set httui.lspPath to a manually-installed binary
LSP starts then exitsVault config errorOpen connections.toml / envs/*.toml and check syntax
No completionsLSP started but vault not detectedSet httui.vault explicitly

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
}

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).