Claude Code Zed banner
celve celve

Claude Code Zed

Development community

Description

Zed extension for Claude Code CLI integration

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Claude Code Zed Integration

A two-part system that integrates Claude Code CLI with Zed editor for AI-assisted coding.

![File Selection Demo](docs/file-select.png)

Current Integration Status

Working Features

  • Text Selection Sharing: Zed can send selected text context to Claude Code CLI
  • Selection State Persistence: Selection state is maintained across interactions
  • File Reference Handling: Selected code snippets and file paths are transmitted
  • Workspace Info: Claude Code can query workspace folders via getWorkspaceFolders
  • Multi-Project Support: Each project gets its own isolated LSP instance
  • Stale Connection Handling: Watchdog automatically exits LSP if connection becomes stale
  • WebSocket Communication: Stable connection between Zed and Claude Code CLI

MCP Tools Available

The following tools are exposed to Claude Code CLI:

  • getCurrentSelection - Get the current text selection in the active editor
  • getLatestSelection - Get the most recent text selection
  • getWorkspaceFolders - Get the workspace folders open in the IDE
  • getDiagnostics - Get diagnostics (errors, warnings) for files in the workspace

Limitations

  • LSP Diagnostics: Currently returns empty - Zed extension doesn't expose IDE diagnostic information to Claude Code CLI
  • One-way Communication: Primary flow is Zed to Claude Code; limited Claude Code to Zed capabilities
  • IDE-specific tools not supported: Tools like openFile, openDiff, saveDocument are not available in Zed integration

Installation

Prerequisites

  • Zed editor
  • Claude Code CLI

Setup

  1. **Clone the repository**:

    git clone https://github.com/celve/claude-code-zed.git
  2. **Install the Zed extension** (Development Mode):

    • Open Zed editor
    • Press Cmd+Shift+P (macOS) or Ctrl+Shift+P (Linux/Windows) to open the command palette
    • Type "zed: install dev extension" and select it
    • Navigate to and select the `claude-