logiguard fork: GPUI xdg-activation keyboard-focus serial fix
Some checks failed
Update All Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Triage Project Sync (#84) / Sync triage project (push) Has been cancelled
release_nightly / notify_on_failure (push) Has been cancelled
release_nightly / check_style (push) Has been cancelled
release_nightly / run_tests_windows (push) Has been cancelled
release_nightly / clippy_windows (push) Has been cancelled
release_nightly / bundle_linux_aarch64 (push) Has been cancelled
release_nightly / bundle_linux_x86_64 (push) Has been cancelled
release_nightly / bundle_mac_aarch64 (push) Has been cancelled
release_nightly / bundle_mac_x86_64 (push) Has been cancelled
release_nightly / bundle_windows_aarch64 (push) Has been cancelled
release_nightly / bundle_windows_x86_64 (push) Has been cancelled
release_nightly / build_nix_linux_x86_64 (push) Has been cancelled
release_nightly / build_nix_mac_aarch64 (push) Has been cancelled
release_nightly / update_nightly_tag (push) Has been cancelled
Hotfix Review Monitor / check-hotfix-reviews (push) Has been cancelled
Stale PR Review Reminder / check-stale-prs (push) Has been cancelled
Update Weekly Top Ranking Issues / update_top_ranking_issues (push) Has been cancelled
Bump collab-staging Tag / update-collab-staging-tag (push) Has been cancelled
compliance_check / scheduled_compliance_check (push) Has been cancelled

Single-commit orphan branch: full zed-industries/zed @ 8c74db0 source tree
with a 3-file patch applied (no upstream history).

Patch (crates/gpui_linux/src/linux/wayland/):
  - serial.rs: add SerialKind::KeyboardEnter
  - client.rs: store wl_keyboard.enter serial; add latest_serial_of()
  - window.rs: activate() uses keyboard-enter serial (Mutter focus gate)

Mutter honors window activation only when the token carries the keyboard-
focus serial from wl_keyboard.enter; GPUI used a stale mouse-press serial.
See docs/tray-window-focus-wayland.md in logiguard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mohamad Khani
2026-07-14 02:22:17 +03:30
commit b72a46db68
3984 changed files with 1583326 additions and 0 deletions

View File

@@ -0,0 +1,349 @@
<!--
GOLD STANDARD EXAMPLE: Complex Feature Documentation
This example demonstrates documentation for a major feature with multiple
sub-features, configuration options, and an action reference table.
Key patterns to note:
- Anchor IDs on all major sections for stable deep-linking
- Opening paragraph explains what and why
- Configuration section with JSON examples
- Proper callout formatting (> **Note:** and > **Tip:**)
- Comprehensive action reference table at the end
- Uses {#action ...} and {#kb ...} syntax throughout
-->
---
description: Zed is a text editor that supports lots of Git features
title: Zed Editor Git integration documentation
---
# Git
Zed has built-in Git support that lets you manage version control without leaving the editor. The Git Panel shows your working tree state, staging area, and branch information. Changes you make on the command line are reflected immediately in Zed.
For operations that Zed doesn't support natively, you can use the integrated terminal.
## Git Panel {#git-panel}
The Git Panel shows the state of your working tree and Git's staging area.
You can open the Git Panel using {#action git_panel::ToggleFocus}, or by clicking the Git icon in the status bar.
In the panel you can see the state of your project at a glance: which repository and branch are active, what files have changed and the current staging state of each file.
Zed monitors your repository so that changes you make on the command line are instantly reflected.
### Configuration {#configuration}
Open the Settings Editor (`Cmd+,` on macOS, `Ctrl+,` on Linux/Windows) to customize Git behavior. Settings are spread across two pages:
- **Panels > Git Panel**: Panel position, tree vs flat view, status display style
- **Version Control**: Gutter indicators, inline blame, hunk styles
#### Moving the Git Panel
By default, the Git Panel docks on the left. Go to **Panels > Git Panel** and change **Git Panel Dock** to move it to the right or bottom.
#### Switching to Tree View
The Git Panel shows a flat list of changed files by default. To see files organized by folder hierarchy instead, toggle **Tree View** in the panel's context menu, or enable it in **Panels > Git Panel**.
#### Inline Blame
Zed shows Git blame information on the current line. To turn this off or add a delay before it appears, go to **Version Control > Inline Git Blame**.
#### Hiding the Gutter Indicators
The colored bars in the gutter that show added, modified, and deleted lines can be hidden. Go to **Version Control > Git Gutter** and set **Visibility** to "Hide".
#### Commit Message Line Length
Zed wraps commit messages at 72 characters (a Git convention). To change this, search for "Git Commit" in Settings and adjust **Preferred Line Length**.
## Project Diff {#project-diff}
You can see all of the changes captured by Git in Zed by opening the Project Diff ({#kb git::Diff}), accessible via the {#action git::Diff} action in the Command Palette or the Git Panel.
All of the changes displayed in the Project Diff behave exactly the same as any other multibuffer: they are all editable excerpts of files.
You can stage or unstage each hunk as well as a whole file by hitting the buttons on the tab bar or their corresponding keybindings.
### Word Diff Highlighting {#word-diff}
By default, Zed highlights changed words within modified lines to make it easier to spot exactly what changed. To disable this globally, open the Settings Editor and go to **Languages & Tools > Miscellaneous**, then turn off **Word Diff Enabled**.
To disable word diff for specific languages only, add this to your settings.json:
```json
{
"languages": {
"Markdown": {
"word_diff_enabled": false
}
}
}
```
## File History {#file-history}
File History shows the commit history for an individual file. Each entry displays the commit's author, timestamp, and message. Selecting a commit opens a diff view filtered to show only the changes made to that file in that commit.
To view File History:
- Right-click on a file in the Project Panel and select "View File History"
- Right-click on a file in the Git Panel and select "View File History"
- Right-click on an editor tab and select "View File History"
- Use the Command Palette and search for "file history"
## Fetch, Push, and Pull {#fetch-push-pull}
Fetch, push, or pull from your Git repository in Zed via the buttons available on the Git Panel or via the Command Palette by looking at the respective actions: {#action git::Fetch}, {#action git::Push}, and {#action git::Pull}.
### Push Configuration {#push-configuration}
Zed respects Git's push configuration. When pushing, Zed checks the following in order:
1. `pushRemote` configured for the current branch
2. `remote.pushDefault` in your Git config
3. The branch's tracking remote
This matches Git's standard behavior, so if you've configured `pushRemote` or `pushDefault` in your `.gitconfig` or via `git config`, Zed will use those settings.
## Remotes {#remotes}
When your repository has multiple remotes, Zed shows a remote selector in the Git Panel. Click the remote button next to push/pull to choose which remote to use for that operation.
## Staging Workflow {#staging-workflow}
Zed has two primary staging workflows, using either the Project Diff or the panel directly.
### Using the Project Diff {#staging-project-diff}
In the Project Diff view, you can focus on each hunk and stage them individually by clicking on the tab bar buttons or via the keybindings {#action git::StageAndNext} ({#kb git::StageAndNext}).
Similarly, stage all hunks at the same time with the {#action git::StageAll} ({#kb git::StageAll}) keybinding and then immediately commit with {#action git::Commit} ({#kb git::Commit}).
### Using the Git Panel {#staging-git-panel}
From the panel, you can simply type a commit message and hit the commit button, or {#action git::Commit}. This will automatically stage all tracked files (indicated by a `[·]` in the entry's checkbox) and commit them.
Entries can be staged using each individual entry's checkbox. All changes can be staged using the button at the top of the panel, or {#action git::StageAll}.
## Committing {#committing}
Zed offers two commit textareas:
1. The first one is available right at the bottom of the Git Panel. Hitting {#kb git::Commit} immediately commits all of your staged changes.
2. The second is available via the action {#action git::ExpandCommitEditor} or via hitting the {#kb git::ExpandCommitEditor} while focused in the Git Panel commit textarea.
### Undoing a Commit {#undo-commit}
As soon as you commit in Zed, in the Git Panel, you'll see a bar right under the commit textarea, which will show the recently submitted commit.
In there, you can use the "Uncommit" button, which performs the `git reset HEADˆ--soft` command.
### Configuring Commit Line Length
By default, Zed sets the commit line length to `72` but it can be configured in your local `settings.json` file.
Find more information about setting the `preferred-line-length` in the [Configuration](#configuration) section.
## Branch Management {#branch-management}
### Creating and Switching Branches {#create-switch-branches}
Create a new branch using {#action git::Branch} or switch to an existing branch using {#action git::Switch} or {#action git::CheckoutBranch}.
### Deleting Branches {#delete-branches}
To delete a branch, open the branch switcher with {#action git::Switch}, find the branch you want to delete, and use the delete option. Zed will confirm before deleting to prevent accidental data loss.
> **Note:** You cannot delete the branch you currently have checked out. Switch to a different branch first.
## Merge Conflicts {#merge-conflicts}
When you encounter merge conflicts after a merge, rebase, or pull, Zed highlights the conflicting regions in your files and displays resolution buttons above each conflict.
### Viewing Conflicts {#viewing-conflicts}
Conflicting files appear in the Git Panel with a warning icon. You can also see conflicts in the Project Diff view, where each conflict region is highlighted:
- Changes from your current branch are highlighted in green
- Changes from the incoming branch are highlighted in blue
### Resolving Conflicts {#resolving-conflicts}
Each conflict shows three buttons:
- **Use [branch-name]**: Keep the changes from one branch (shows the actual branch name, like "main")
- **Use [other-branch]**: Keep the changes from the other branch (like "feature-branch")
- **Use Both**: Keep both sets of changes, with your branch's changes first
Click a button to resolve that conflict. The conflict markers are removed and replaced with your chosen content. After resolving all conflicts in a file, stage it and commit to complete the merge.
> **Tip:** For complex conflicts that need manual editing, you can edit the file directly. Remove the conflict markers (`<<<<<<<`, `=======`, `>>>>>>>`) and keep the content you want.
## Stashing {#stashing}
Git stash allows you to temporarily save your uncommitted changes and revert your working directory to a clean state. This is particularly useful when you need to quickly switch branches or pull updates without committing incomplete work.
### Creating Stashes {#creating-stashes}
To stash all your current changes, use the {#action git::StashAll} action. This will save both staged and unstaged changes to a new stash entry and clean your working directory.
### Managing Stashes {#managing-stashes}
Zed provides a stash picker accessible via {#action git::ViewStash} or from the Git Panel's overflow menu. From the stash picker, you can:
- **View stash list**: Browse all your saved stashes with their descriptions and timestamps
- **Open diffs**: See exactly what changes are stored in each stash
- **Apply stashes**: Apply stash changes to your working directory while keeping the stash entry
- **Pop stashes**: Apply stash changes and remove the stash entry from the list
- **Drop stashes**: Delete unwanted stash entries without applying them
### Quick Stash Operations {#quick-stash}
For faster workflows, Zed provides direct actions to work with the most recent stash:
- **Apply latest stash**: Use {#action git::StashApply} to apply the most recent stash without removing it
- **Pop latest stash**: Use {#action git::StashPop} to apply and remove the most recent stash
### Stash Diff View {#stash-diff-view}
To view a stash's contents, select it in the stash picker and press {#kb stash_picker::ShowStashItem}. From the diff view, you can use these keybindings:
| Action | Keybinding |
| ------------------------------------ | ---------------------------- |
| Apply stash | {#kb git::ApplyCurrentStash} |
| Pop stash (apply and remove) | {#kb git::PopCurrentStash} |
| Drop stash (remove without applying) | {#kb git::DropCurrentStash} |
## AI Support in Git {#ai-support}
Zed currently supports LLM-powered commit message generation.
You can ask AI to generate a commit message by focusing on the message editor within the Git Panel and either clicking on the pencil icon in the bottom left, or reaching for the {#action git::GenerateCommitMessage} ({#kb git::GenerateCommitMessage}) keybinding.
> **Note:** You need to have an LLM provider configured either via your own API keys or through Zed's hosted AI models.
> Visit [the AI configuration page](./ai/configuration.md) to learn how to do so.
You can specify your preferred model to use by providing a `commit_message_model` agent setting.
See [Feature-specific models](./ai/agent-settings.md#feature-specific-models) for more information.
```json [settings]
{
"agent": {
"commit_message_model": {
"provider": "anthropic",
"model": "claude-3-5-haiku"
}
}
}
```
To customize the format of generated commit messages, run {#action agent::OpenRulesLibrary} and select the "Commit message" rule on the left side.
From there, you can modify the prompt to match your desired format.
Any specific instructions for commit messages added to [Rules files](./ai/rules.md) are also picked up by the model tasked with writing your commit message.
## Git Integrations {#git-integrations}
Zed integrates with popular Git hosting services to ensure that Git commit hashes and references to Issues, Pull Requests, and Merge Requests become clickable links.
Zed currently supports links to the hosted versions of
[GitHub](https://github.com),
[GitLab](https://gitlab.com),
[Bitbucket](https://bitbucket.org),
[SourceHut](https://sr.ht) and
[Codeberg](https://codeberg.org).
### Self-Hosted Instances {#self-hosted}
Zed automatically identifies Git hosting providers by checking for keywords in your Git remote URL. For example, if your self-hosted URL contains `gitlab`, `gitea`, or other recognized provider names, Zed will automatically register that hosting provider without any configuration needed.
However, if your self-hosted Git instance URL doesn't contain identifying keywords, you can manually configure Zed to create clickable links to your instance by adding a `git_hosting_providers` setting so commit hashes and permalinks resolve to your domain:
```json [settings]
{
"git_hosting_providers": [
{
"provider": "gitlab",
"name": "Corp GitLab",
"base_url": "https://git.example.corp"
}
]
}
```
The `provider` field specifies which type of hosting service you're using. Supported `provider` values are `github`, `gitlab`, `bitbucket`, `gitea`, `forgejo`, and `sourcehut`. The `name` is optional and used as a display name for your instance, and `base_url` is the root URL of your self-hosted server.
You can configure multiple custom providers if you work with several self-hosted instances.
### Permalinks {#permalinks}
Zed also has a Copy Permalink feature to create a permanent link to a code snippet on your Git hosting service.
These links are useful for sharing a specific line or range of lines in a file at a specific commit.
Trigger this action via the [Command Palette](./getting-started.md#command-palette) (search for `permalink`),
by creating a [custom key bindings](key-bindings.md#custom-key-bindings) to the
`editor::CopyPermalinkToLine` or `editor::OpenPermalinkToLine` actions
or by simply right clicking and selecting `Copy Permalink` with line(s) selected in your editor.
## Diff Hunk Keyboard Shortcuts {#diff-hunks}
When viewing files with changes, Zed displays diff hunks that can be expanded or collapsed for detailed review:
- **Expand all diff hunks**: {#action editor::ExpandAllDiffHunks} ({#kb editor::ExpandAllDiffHunks})
- **Collapse all diff hunks**: Press `Escape` (bound to {#action editor::Cancel})
- **Toggle selected diff hunks**: {#action editor::ToggleSelectedDiffHunks} ({#kb editor::ToggleSelectedDiffHunks})
- **Navigate between hunks**: {#action editor::GoToHunk} and {#action editor::GoToPreviousHunk}
> **Tip:** The `Escape` key is the quickest way to collapse all expanded diff hunks and return to an overview of your changes.
## Action Reference {#action-reference}
| Action | Keybinding |
| ----------------------------------------- | ------------------------------------- |
| {#action git::Add} | {#kb git::Add} |
| {#action git::StageAll} | {#kb git::StageAll} |
| {#action git::UnstageAll} | {#kb git::UnstageAll} |
| {#action git::ToggleStaged} | {#kb git::ToggleStaged} |
| {#action git::StageAndNext} | {#kb git::StageAndNext} |
| {#action git::UnstageAndNext} | {#kb git::UnstageAndNext} |
| {#action git::Commit} | {#kb git::Commit} |
| {#action git::ExpandCommitEditor} | {#kb git::ExpandCommitEditor} |
| {#action git::Push} | {#kb git::Push} |
| {#action git::ForcePush} | {#kb git::ForcePush} |
| {#action git::Pull} | {#kb git::Pull} |
| {#action git::PullRebase} | {#kb git::PullRebase} |
| {#action git::Fetch} | {#kb git::Fetch} |
| {#action git::Diff} | {#kb git::Diff} |
| {#action git::Restore} | {#kb git::Restore} |
| {#action git::RestoreFile} | {#kb git::RestoreFile} |
| {#action git::Branch} | {#kb git::Branch} |
| {#action git::Switch} | {#kb git::Switch} |
| {#action git::CheckoutBranch} | {#kb git::CheckoutBranch} |
| {#action git::Blame} | {#kb git::Blame} |
| {#action git::StashAll} | {#kb git::StashAll} |
| {#action git::StashPop} | {#kb git::StashPop} |
| {#action git::StashApply} | {#kb git::StashApply} |
| {#action git::ViewStash} | {#kb git::ViewStash} |
| {#action editor::ToggleGitBlameInline} | {#kb editor::ToggleGitBlameInline} |
| {#action editor::ExpandAllDiffHunks} | {#kb editor::ExpandAllDiffHunks} |
| {#action editor::ToggleSelectedDiffHunks} | {#kb editor::ToggleSelectedDiffHunks} |
> **Note:** Not all actions have default keybindings, but can be bound by [customizing your keymap](./key-bindings.md#user-keymaps).
## Git CLI Configuration {#cli-configuration}
If you would like to also use Zed for your [git commit message editor](https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_editor) when committing from the command line you can use `zed --wait`:
```sh
git config --global core.editor "zed --wait"
```
Or add the following to your shell environment (in `~/.zshrc`, `~/.bashrc`, etc):
```sh
export GIT_EDITOR="zed --wait"
```

View File

@@ -0,0 +1,158 @@
<!--
GOLD STANDARD EXAMPLE: Configuration Documentation
This example demonstrates documentation for settings and configuration.
Key patterns to note:
- Anchor IDs on all major sections
- Opening paragraph explains what this guide covers
- Multiple JSON examples with [settings] annotation
- Platform-specific file paths
- Proper callout formatting
- "See Also" section at the end (not "What's Next")
-->
---
title: Configuring Zed - Settings and Preferences
description: Configure Zed with the Settings Editor, JSON files, and project-specific overrides. Covers all settings options.
---
# Configuring Zed
This guide explains how Zed's settings system works, including the Settings Editor, JSON configuration files, and project-specific settings.
For visual customization (themes, fonts, icons), see [Appearance](./appearance.md).
## Settings Editor {#settings-editor}
The **Settings Editor** ({#kb zed::OpenSettings}) is the primary way to configure Zed. It provides a searchable interface where you can browse available settings, see their current values, and make changes.
To open it:
- Press {#kb zed::OpenSettings}
- Or run {#action zed::OpenSettings} from the command palette
As you type in the search box, matching settings appear with descriptions and controls to modify them. Changes save automatically to your settings file.
> **Note:** Not all settings are available in the Settings Editor yet. Some advanced options, like language formatters, require editing the JSON file directly.
## Settings Files {#settings-files}
### User Settings {#user-settings}
Your user settings apply globally across all projects. Open the file with {#kb zed::OpenSettingsFile} or run {#action zed::OpenSettingsFile} from the command palette.
The file is located at:
- macOS: `~/.config/zed/settings.json`
- Linux: `~/.config/zed/settings.json` (or `$XDG_CONFIG_HOME/zed/settings.json`)
- Windows: `%APPDATA%\Zed\settings.json`
The syntax is JSON with support for `//` comments.
### Default Settings {#default-settings}
To see all available settings with their default values, run {#action zed::OpenDefaultSettings} from the command palette. This opens a read-only reference you can use when editing your own settings.
### Project Settings {#project-settings}
Override user settings for a specific project by creating a `.zed/settings.json` file in your project root. Run {#action zed::OpenProjectSettings} to create this file.
Project settings take precedence over user settings for that project only.
```json [settings]
// .zed/settings.json
{
"tab_size": 2,
"formatter": "prettier",
"format_on_save": "on"
}
```
You can also add settings files in subdirectories for more granular control.
> **Note:** Not all settings can be set at the project level. Settings that affect the editor globally (like `theme` or `vim_mode`) only work in user settings. Project settings are limited to editor behavior and language tooling options like `tab_size`, `formatter`, and `format_on_save`.
## How Settings Merge {#how-settings-merge}
Settings are applied in layers:
1. **Default settings** — Zed's built-in defaults
2. **User settings** — Your global preferences
3. **Project settings** — Project-specific overrides
Later layers override earlier ones. For object settings (like `terminal`), properties merge rather than replace entirely.
## Per-Release Channel Overrides {#release-channel-overrides}
Use different settings for Stable, Preview, or Nightly builds by adding top-level channel keys:
```json [settings]
{
"theme": "One Dark",
"vim_mode": false,
"nightly": {
"theme": "Rosé Pine",
"vim_mode": true
},
"preview": {
"theme": "Catppuccin Mocha"
}
}
```
With this configuration:
- **Stable** uses One Dark with vim mode off
- **Preview** uses Catppuccin Mocha with vim mode off
- **Nightly** uses Rosé Pine with vim mode on
Changes made in the Settings Editor apply across all channels.
## Settings Deep Links {#deep-links}
Zed supports deep links that open specific settings directly:
```
zed://settings/theme
zed://settings/vim_mode
zed://settings/buffer_font_size
```
These are useful for sharing configuration tips or linking from documentation.
## Example Configuration {#example-configuration}
```json [settings]
{
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark"
},
"buffer_font_family": "JetBrains Mono",
"buffer_font_size": 14,
"tab_size": 2,
"format_on_save": "on",
"autosave": "on_focus_change",
"vim_mode": false,
"terminal": {
"font_family": "JetBrains Mono",
"font_size": 14
},
"languages": {
"Python": {
"tab_size": 4
}
}
}
```
## See Also {#see-also}
- [Appearance](./appearance.md) — Themes, fonts, and visual customization
- [Key bindings](./key-bindings.md) — Customize keyboard shortcuts
- [AI Configuration](./ai/configuration.md) — Set up AI providers, models, and agent settings
- [All Settings](./reference/all-settings.md) — Complete settings reference

View File

@@ -0,0 +1,103 @@
<!--
GOLD STANDARD EXAMPLE: Reference Documentation
This example demonstrates documentation for API/reference content like tools,
actions, or other enumerable items.
Key patterns to note:
- Anchor IDs on categories and individual items for deep-linking
- Opening paragraph explains what these are and where they're used
- Organized into logical categories
- Each item has a clear, actionable description
- Links to related configuration docs
- "See Also" section for related topics
-->
---
title: AI Agent Tools - Zed
description: Built-in tools for Zed's AI agent including file editing, code search, terminal commands, web search, and diagnostics.
---
# Tools
Zed's built-in agent has access to these tools for reading, searching, and editing your codebase. These tools are used in the [Agent Panel](./agent-panel.md) during conversations with AI agents.
You can configure permissions for tool actions, including situations where they are automatically approved, automatically denied, or require your confirmation on a case-by-case basis. See [Tool Permissions](./tool-permissions.md) for the list of permission-gated tools and details.
To add custom tools beyond these built-in ones, see [MCP servers](./mcp.md).
## Read & Search Tools {#read-search-tools}
### `diagnostics` {#diagnostics}
Gets errors and warnings for either a specific file or the entire project, useful after making edits to determine if further changes are needed.
When a path is provided, shows all diagnostics for that specific file.
When no path is provided, shows a summary of error and warning counts for all files in the project.
### `fetch` {#fetch}
Fetches a URL and returns the content as Markdown. Useful for providing docs as context.
### `find_path` {#find-path}
Quickly finds files by matching glob patterns (like `**/*.js`), returning matching file paths alphabetically.
### `grep` {#grep}
Searches file contents across the project using regular expressions, preferred for finding symbols in code without knowing exact file paths.
### `list_directory` {#list-directory}
Lists files and directories in a given path, providing an overview of filesystem contents.
### `read_file` {#read-file}
Reads the content of a specified file in the project, allowing access to file contents.
### `search_web` {#search-web}
Searches the web for information, providing results with snippets and links from relevant web pages, useful for accessing real-time information.
## Edit Tools {#edit-tools}
### `copy_path` {#copy-path}
Copies a file or directory recursively in the project, more efficient than manually reading and writing files when duplicating content.
### `create_directory` {#create-directory}
Creates a new directory at the specified path within the project, creating all necessary parent directories (similar to `mkdir -p`).
### `delete_path` {#delete-path}
Deletes a file or directory (including contents recursively) at the specified path and confirms the deletion.
### `edit_file` {#edit-file}
Edits files by replacing specific text with new content.
### `move_path` {#move-path}
Moves or renames a file or directory in the project, performing a rename if only the filename differs.
### `write_file` {#write-file}
Creates a new file or overwrites an existing file with completely new contents.
### `terminal` {#terminal}
Executes shell commands and returns the combined output, creating a new shell process for each invocation.
## Other Tools {#other-tools}
### `spawn_agent` {#spawn-agent}
Spawns a subagent with its own context window to perform a delegated task. Useful for running parallel investigations, completing self-contained tasks, or performing research where only the outcome matters. Each subagent has access to the same tools as the parent agent.
## See Also {#see-also}
- [Agent Panel](./agent-panel.md) — Where you interact with AI agents
- [Tool Permissions](./tool-permissions.md) — Configure which tools require approval
- [MCP Servers](./mcp.md) — Add custom tools via Model Context Protocol

View File

@@ -0,0 +1,81 @@
<!--
GOLD STANDARD EXAMPLE: Simple Feature / Overview Documentation
This example demonstrates concise documentation for a feature overview
or navigation guide.
Key patterns to note:
- Anchor IDs on all sections
- Brief opening paragraph explains what this covers
- Each section is concise (1-2 paragraphs max)
- Links to detailed docs for each feature
- Quick reference table at the end
- Uses {#kb ...} syntax for all keybindings
-->
---
title: Finding and Navigating Code - Zed
description: Navigate your codebase in Zed with file finder, project search, go to definition, symbol search, and the command palette.
---
# Finding & Navigating
Zed provides several ways to move around your codebase quickly. Here's an overview of the main navigation tools.
## Command Palette {#command-palette}
The Command Palette ({#kb command_palette::Toggle}) is your gateway to almost everything in Zed. Type a few characters to filter commands, then press Enter to execute.
[Learn more about the Command Palette →](./command-palette.md)
## File Finder {#file-finder}
Open any file in your project with {#kb file_finder::Toggle}. Type part of the filename or path to narrow results.
## Project Search {#project-search}
Search across all files with {#kb pane::DeploySearch}. Results appear in a [multibuffer](./multibuffers.md), letting you edit matches in place.
## Go to Definition {#go-to-definition}
Jump to where a symbol is defined with {#kb editor::GoToDefinition} (or `Cmd+Click` / `Ctrl+Click`). If there are multiple definitions, they open in a multibuffer.
## Go to Symbol {#go-to-symbol}
- **Current file:** {#kb outline::Toggle} opens an outline of symbols in the active file
- **Entire project:** {#kb project_symbols::Toggle} searches symbols across all files
## Outline Panel {#outline-panel}
The Outline Panel ({#kb outline_panel::ToggleFocus}) shows a persistent tree view of symbols in the current file. It's especially useful with [multibuffers](./multibuffers.md) for navigating search results or diagnostics.
[Learn more about the Outline Panel →](./outline-panel.md)
## Tab Switcher {#tab-switcher}
Quickly switch between open tabs with {#kb tab_switcher::Toggle}. Tabs are sorted by recent use—keep holding Ctrl and press Tab to cycle through them.
[Learn more about the Tab Switcher →](./tab-switcher.md)
## Quick Reference {#quick-reference}
| Task | Keybinding |
| ----------------- | -------------------------------- |
| Command Palette | {#kb command_palette::Toggle} |
| Open file | {#kb file_finder::Toggle} |
| Project search | {#kb pane::DeploySearch} |
| Go to definition | {#kb editor::GoToDefinition} |
| Find references | {#kb editor::FindAllReferences} |
| Symbol in file | {#kb outline::Toggle} |
| Symbol in project | {#kb project_symbols::Toggle} |
| Outline Panel | {#kb outline_panel::ToggleFocus} |
| Tab Switcher | {#kb tab_switcher::Toggle} |
## See Also {#see-also}
- [Command Palette](./command-palette.md) — Full command palette documentation
- [Multibuffers](./multibuffers.md) — Edit multiple files simultaneously
- [Outline Panel](./outline-panel.md) — Symbol tree view
- [Tab Switcher](./tab-switcher.md) — Switch between open files