This configuration allows Zed to run tasks with specific working directories for multiple projects.
[
{
"label": "backend",
"command": "cargo run --bin anycode_backend --release",
"cwd": "$ZED_WORKTREE_ROOT/src/backend"
},
{
"label": "frontend",
"command": "pnpm run dev",
"cwd": "$ZED_WORKTREE_ROOT/src/frontend"
}
]
- Copy the above JSON content into a
.zed/tasks.json
file in your project. - Modify labels and paths to match your project structure.
- Press
option-shift-t
and select task.
If you have Rust subproject, put this config (fix paths) into file .zed/settings.json for
rust-analyzer
correct work