Zed

From G1Joshi/Agent-Skills · View interactive version

Zed is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert Zed editor assistance covering high-performance Rust-based text editing, multi-buffer editing, language server protocols (LSP), and AI assistant integrations. Use when configuring Zed settings.json, setting up language extensions, collaborating in real-time channels, or optimizing editor star

How to use this skill

Skill file

Zed

Zed is a high-performance, multiplayer code editor written in Rust with a GPU-accelerated UI, native Tree-sitter parsing, and fast Language Server Protocol (LSP) intelligence.

When to Use

Quick Start

1. Minimal ~/.config/zed/settings.json

{
  "theme": "One Dark",
  "buffer_font_family": "JetBrains Mono",
  "buffer_font_size": 14,
  "tab_size": 2,
  "hard_tabs": false,
  "format_on_save": "on",
  "formatter": "auto",
  "lsp": {
    "rust-analyzer": {
      "initialization_options": {
        "checkOnSave": { "command": "clippy" }
      }
    }
  }
}

2. Core Shortcuts

Core Concepts

Production Zed Configuration (`~/.config/zed/settings.json`)

Configuring typography, formatters, LSP language servers, and AI integration:

{
  "theme": "One Dark",
  "ui_font_size": 15,
  "buffer_font_size": 14,
  "buffer_font_family": "JetBrains Mono",
  "autosave": "on_focus_change",
  "format_on_save": "on",
  "tab_size": 2,
  "telemetry": {
    "diagnostics": false,
    "metrics": false
  },
  "languages": {
    "TypeScript": {
      "language_servers": ["vtsls", "!typescript-language-server"],
      "formatter": {
        "external": {
          "command": "prettier",
          "arguments": ["--stdin-filepath", "{buffer_path}"]
        }
      }
    },
    "Rust": {
      "language_servers": ["rust-analyzer"]
    },
    "Python": {
      "language_servers": ["pyright", "ruff"]
    }
  },
  "assistant": {
    "default_model": {
      "provider": "anthropic",
      "model": "claude-3-5-sonnet"
    }
  }
}

Custom Modal & Vim Keybindings (`~/.config/zed/keymap.json`)

Customizing keymaps for high-speed navigation:

[
  {
    "context": "Editor && vim_mode == normal",
    "bindings": {
      "space f f": "file_finder::Toggle",
      "space f g": "pane::DeploySearch",
      "space b d": "pane::CloseActiveItem",
      "space c a": "editor::ToggleCodeActions",
      "g d": "editor::GoToDefinition",
      "g r": "editor::FindAllReferences"
    }
  }
]

Instant Multiplayer Collaboration

Common Patterns

Multi-Buffer Project Search & Replace

Problem: Searching across entire codebase and editing results simultaneously in a single unified buffer.

Solution:

[
  {
    "context": "ProjectSearchView",
    "bindings": {
      "alt-enter": "project_search::OpenInMultiBuffer"
    }
  }
]

Configuring Custom Language Servers in Zed

Problem: Configure specific language server arguments and formatters in Zed.

Solution: Define server settings in settings.json.

{
  "languages": {
    "Python": {
      "language_servers": ["pyright", "ruff"],
      "format_on_save": "on",
      "formatter": {
        "external": {
          "command": "ruff",
          "arguments": ["format", "--stdin-filename", "{buffer_path}"]
        }
      }
    }
  }
}

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| -------------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |

| Language server fails to initialize | Server binary (e.g. gopls, pyright) not found in system $PATH | Install server binary globally or ensure it is accessible in user shell environment. |

| Keybinding clash with system shortcuts | Mac system keyboard shortcuts intercepting Zed keystrokes | Check settings.json keymap overrides under ~/.config/zed/keymap.json. |

| Zed AI Assistant fails to respond | Missing API key (OpenAI/Anthropic) or quota exceeded | Open Zed settings and configure "features": { "edit_prediction_provider": "copilot" } or provide API key. |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.