Zed
Zed bundles tree-sitter natively and has a clean LSP extension story. The httui-lang Zed extension wires both up.
Install
Section titled “Install”- Open Zed.
Cmd+Shift+X→ Extensions panel.- Search “httui”.
- Install httui-lang.
The extension auto-installs the tree-sitter parser + downloads the
httui-lsp binary on first use.
Config
Section titled “Config”Zed reads .zed/settings.json per project (your vault) and
~/.config/zed/settings.json globally.
{ "lsp": { "httui-lsp": { "binary": { "path": "httui-lsp", "arguments": [] }, "settings": { "httui": { "env": "staging" } } } }, "languages": { "httui": { "tab_size": 2, "format_on_save": "off", "formatter": "language_server" } }}File detection
Section titled “File detection”The extension registers:
*.httui→ languagehttui*.md→ markdown (httui injects into fenced code blocks)
For the markdown injection to work, Zed needs the tree-sitter markdown grammar (built-in) + httui’s injection queries (ship with the extension). No extra config.
Features
Section titled “Features”| Feature | How to use |
|---|---|
| Syntax highlight | Automatic on file open |
| Hover | Mouse over {{ref}} (Zed default K in vim mode) |
| Go to definition | F12 / Cmd+Click |
| Find references | Shift+F12 |
| Rename | F2 |
| Code actions | Cmd+. |
| Format document | Cmd+Shift+I |
| Workspace symbols | Cmd+T |
Active environment
Section titled “Active environment”Set per-vault in .zed/settings.json:
{ "lsp": { "httui-lsp": { "settings": { "httui": { "env": "staging" } } } }}Or globally if you mostly work on one env. To switch on the fly:
Cmd+Shift+P → “httui: Set active environment”.
Run code lens
Section titled “Run code lens”If the httui desktop app is running on the same vault, Zed shows a
“Run” lens above each block. Click it → the LSP sends
httui/blockRun to the desktop, which executes and returns the
result inline (rendered in a small panel below the block via Zed’s
inline UI).
Without the desktop running, the lens shows “Run in TUI →” —
clicking opens a terminal split with httui-tui run <file>.
Theming
Section titled “Theming”httui-lang ships with token mappings that respect Zed themes:
| httui node | Zed token (default) |
|---|---|
(verb) | keyword |
(alias_ref ident) | function |
(env_ref ident) | constant |
(field) @assertion | variable.special |
(literal) @assertion | string |
(reference) (whole) | embedded |
Custom themes pick these up automatically. To override, in
settings.json:
{ "experimental.theme_overrides": { "syntax": { "function": { "color": "#84B5FF" }, "constant": { "color": "#FFCC66" } } }}Snippets
Section titled “Snippets”Zed reads .zed/snippets/httui.json per-project:
{ "HTTP block": { "prefix": "http", "body": [ "http alias=$1", "${2:GET} ${3:https://example.com/path}", "${4:Accept: application/json}", "$0" ] }, "HTTP with expect": { "prefix": "httpexpect", "body": [ "http alias=$1", "${2:GET} ${3:https://example.com/path}", "", "# expect:", "# status == 200", "$0" ] }, "DB block": { "prefix": "db", "body": [ "db-${1:local}", "SELECT $0" ] }}Troubleshooting
Section titled “Troubleshooting”Extension didn’t install LSP binary
Section titled “Extension didn’t install LSP binary”The extension downloads httui-lsp from GitHub Releases on first
use. If offline / blocked:
cargo install httui-lspThen set the path explicitly:
{ "lsp": { "httui-lsp": { "binary": { "path": "/Users/you/.cargo/bin/httui-lsp" } } } }Markdown injection not working
Section titled “Markdown injection not working”Check Zed’s tree-sitter playground:
Cmd+Shift+P → “editor: open tree-sitter playground”.
Open a .md runbook with httui fences. The tree should show the
http / db-* regions parsed by httui. If not, reinstall the
extension.
LSP doesn’t pick up env changes
Section titled “LSP doesn’t pick up env changes”Reload the LSP:
Cmd+Shift+P → “editor: restart language server”.
Related
Section titled “Related”- LSP capabilities — what the server provides
- Tree-sitter grammar — node types
- Helix setup — similar story