Skip to content

v0.1.0 — REST Client for Zed

Latest

Choose a tag to compare

@cb-tong-zhou cb-tong-zhou released this 16 Mar 03:47

REST Client Extension for Zed IDE

A full-featured REST client extension for Zed that lets you write and execute HTTP requests directly from .http and .rest files.

✨ Features

  • ▶ Send Request — Execute HTTP requests with a single click, reusing the same terminal
  • ⊕ Send in New Tab — Execute in a new terminal tab, titled with the request URL
  • 📋 Generate cURL — Copy any request as a cURL command to clipboard
  • Syntax Highlighting — Full tree-sitter grammar for .http and .rest files
  • Autocompletion — HTTP methods, headers, header values, and {{variable}} references
  • Document Symbols — Navigate requests via Zed's symbol outline
  • Variable Support — @variable = value declarations with {{variable}} substitution and nested resolution
  • Response Variable Capture — JetBrains-compatible > {% client.global.set("name", response.body.field) %} syntax
  • Environment Variables — JetBrains-compatible http-client.env.json + http-client.private.env.json with parent directory search
  • activeEnv Selection — Set the active environment via "activeEnv" key in http-client.env.json
  • Colored JSON Output — Syntax-highlighted JSON response bodies (keys, strings, numbers, booleans, null, braces)
  • Spinner with Color Animation — Braille spinner with cycling colors and elapsed time counter during requests
  • Precise Timing — X.XXXs for responses ≥1s, Xms for <1s
  • Detailed Error Messages — Full error source chain (DNS, connection refused, timeouts, etc.)

🏗️ Architecture

  • WASM Extension (src/lib.rs) — Zed extension entry point, language server lifecycle
  • LSP Server (lsp/src/main.rs) — Completions, document symbols, diagnostics
  • HTTP Parser (lsp/src/parser.rs) — Full HTTP file parser with 28 tests
  • CLI Binary (lsp/src/bin/http-client.rs) — Request execution with colored output
  • Variable System (lsp/src/variables.rs) — Environment loading, variable resolution, activeEnv
  • Response Handler (lsp/src/response_handler.rs) — Response variable capture and persistence
  • Completions Data (lsp/src/completions.rs) — HTTP methods, headers, values, auth schemes

📦 Installation

git clone https://github.com/zed-ext/restclient.git
cd restclient
./install_to_zed.sh

Then restart Zed completely (Cmd+Q and reopen).

📖 Documentation