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.jsonfile in your project. - Modify labels and paths to match your project structure.
- Press
option-shift-tand select task.
If you have Rust subproject, put this config (fix paths) into file .zed/settings.json for
rust-analyzercorrect work{ "lsp": { "rust-analyzer": { "initialization_options": { "linkedProjects": [ "src/backend/Cargo.toml" ] } } } }