.http file support for Zed: syntax highlighting, runnable requests, and an
optional LSP that wraps httpyac so request
execution, variable interpolation, scripts, assertions, and the rest of
httpyac's feature set work without leaving the editor.
The extension targets the JetBrains HTTP request-in-editor spec and the httpyac extensions on top of it.
- Syntax highlighting (
#,//, and/* */comments, requests, headers, variables, response handlers, redirects). - Embedded-language injections for JSON / XML / GraphQL request bodies and JS pre-request / response handler scripts.
- Outline view powered by
### request nameseparators. - Two ways to run requests:
zed: install dev extension and point at this directory. Zed will compile the
grammar (cloning ToyVoDev/tree-sitter-http at the pinned commit) and build
the extension wasm. That's enough for syntax highlighting and the runnable
tasks below.
Add this to .zed/tasks.json to wire the runnable tag emitted by the
extension to your CLI of choice (default example uses httpyac):
[
{
"label": "Run HTTP Request",
"command": "httpyac",
"args": ["send", "--line", "$ZED_ROW", "$ZED_FILE"],
"tags": ["http-request"],
"reveal": "always"
},
{
"label": "Run All HTTP Requests",
"command": "httpyac",
"args": ["send", "$ZED_FILE"],
"tags": ["http-request"],
"reveal": "always"
}
]The LSP gives you inline ▶ Send / 👁 Show / 💾 Save / ◉ Headers buttons on
every request, plus a hover summary and code actions. It delegates execution
to httpyac, so variable interpolation, environment files, pre-request scripts,
assertions, gRPC/WS/etc. all work the same as the CLI does.
httpyaconPATH—npm install -g httpyac,nix profile install nixpkgs#httpyac, etc.zed-http-lsponPATH— see install options below.
With cargo:
cd zed-http
cargo install --path http-lspThis puts zed-http-lsp in ~/.cargo/bin/.
With Nix:
nix profile install github:ToyVoDev/zed-http
# or, from a checkout:
nix profile install .This builds the zed-http-lsp package defined in flake.nix.
The LSP advertises itself automatically, but code lens is off by default
in Zed. Add this to your Zed settings to see the inline ▶ Send / 👁 Show / 💾 Save / ◉ Headers buttons above each request:
{
"editor": {
"code_lens": true
}
}(Code lens is the LSP protocol Zed routes through workspace/executeCommand
for clickable inline commands. Inlay hints look similar but don't fire any
command when clicked — Zed drops the command field on inlay-hint label
parts.)
If zed-http-lsp isn't on PATH (or you want to use a custom build), tell
Zed where to find it:
{
"lsp": {
"zed-http-lsp": {
"binary": { "path": "/absolute/path/to/zed-http-lsp" }
}
}
}- Cursor inside a request →
Cmd-./Ctrl-.lists Send / Show / Save / Headers. - Inlay hint buttons render next to each method line; click to invoke.
- Send writes the response to
~/.cache/zed-http/responses/<file>-line<N>-<ts>.http-respand opens it in a new pane. - Save writes a permanent copy next to the source
.httpfile. - Hover shows the request's last response status and timing.
httpyac-rs also ships a httpyac-rs binary that mirrors the upstream
httpyac CLI flag-for-flag. In its current state it proxies every command
through to the npm httpyac binary on PATH; native execution is being added
in phases (see docs/superpowers/plans/2026-05-28-httpyac-rs-cli.md).
Install with cargo:
cd zed-http
cargo install --path httpyac-rs --features cliUse:
httpyac-rs send path/to/file.http --line 14zed-http/
├── src/ wasm extension entry (language-server-command, runnables)
├── languages/http/ tree-sitter queries (highlights, injections, outline, runnables)
├── zed-extension/ extension logic (workspace member)
├── http-lsp/ zed-http-lsp binary crate
├── httpyac-rs/ Rust wrapper around the httpyac CLI; also exposes
│ a `httpyac-rs` binary (off-by-default `cli` feature)
│ that mirrors httpyac's flag surface and proxies
│ through to npm `httpyac`. See
│ docs/superpowers/plans/2026-05-28-httpyac-rs-cli.md
│ for the phased native-port plan.
├── patches/ reference patch applied to ToyVoDev/tree-sitter-http
└── flake.nix devShell + zed-http-lsp Nix package
The grammar is a fork at
ToyVoDev/tree-sitter-http on
the zed-http-patches branch, fixing // comment absorption into raw bodies
and adding /* */ block comments. See patches/ for the diff.
Apache-2.0.

