documents/dev/Zed.md

Zed

Restart Language Server (equivalent to VS Code's "Restart TS Server")

  • Command Palette: ⌘ Shift P → type language server: restart
    • Restarts all running language servers.
    • Optionally scoped to just the language server for the current file.
  • Status Bar: Click the language server icon (bottom right) → restart individual servers from the menu.
  • Keybinding: No default keybinding, but you can add one in keymap.json:
{
  "context": "Editor",
  "bindings": {
    "cmd-k t": "language_server::Restart"
  }
}

Agent Chat — Add Selected Code as Context

  • Default shortcut: ⌘ > — select code, hit this, and it adds the highlighted code (including file path + line numbers) into the agent chat panel as context.
    • Works even if the agent panel isn't open yet — it'll open automatically.
  • Command Palette: ⌘ Shift P → type agent: add selection
  • Right-click the selection → Add Selection to Agent (context menu).
  • Inline references: In the agent chat panel, type @ to quickly reference files, symbols, or the current selection without leaving the chat.

Other Useful Commands

  • ⌘ Shift P → type zed: open keymap — edit keybindings
  • ⌘ , — open settings directly
  • ⌘ Shift P → type zed: open settings — edit settings (via Command Palette)
  • ⌘ / — toggle comment
  • ⌘ Shift \ — toggle left dock
  • ⌘ Shift ] — next tab
  • ⌘ Shift [ — previous tab