|
| 1 | +// Project tasks configuration. See https://zed.dev/docs/tasks for documentation. |
| 2 | +// |
| 3 | +// Example: |
| 4 | +[ |
| 5 | + { |
| 6 | + "label": "Lint", |
| 7 | + "command": "make run-lint", |
| 8 | + "reveal": "no_focus", |
| 9 | + "hide": "on_success" |
| 10 | + }, |
| 11 | + { |
| 12 | + "label": "Strict Lint", |
| 13 | + "command": "make run-strict-lint", |
| 14 | + "reveal": "no_focus", |
| 15 | + "hide": "on_success" |
| 16 | + }, |
| 17 | + { |
| 18 | + "label": "Test Package", |
| 19 | + "command": "go test", |
| 20 | + "args": ["./$ZED_RELATIVE_DIR"], |
| 21 | + "reveal": "no_focus", |
| 22 | + "hide": "on_success" |
| 23 | + }, |
| 24 | + { |
| 25 | + "label": "Lint Package", |
| 26 | + "command": "golangci-lint run -v --timeout=10m", |
| 27 | + "args": ["./$ZED_RELATIVE_DIR"], |
| 28 | + "reveal": "no_focus", |
| 29 | + "hide": "on_success" |
| 30 | + }, |
| 31 | + { |
| 32 | + "label": "This Test", |
| 33 | + "command": "go", |
| 34 | + "args": ["test", "./$ZED_RELATIVE_DIR", "-v", "-run", "$ZED_SYMBOL"], |
| 35 | + "reveal": "no_focus", |
| 36 | + "hide": "on_success" |
| 37 | + }, |
| 38 | + { |
| 39 | + "label": "Example task", |
| 40 | + "command": "for i in {1..5}; do echo \"Hello $i/5\"; sleep 1; done", |
| 41 | + //"args": [], |
| 42 | + // Env overrides for the command, will be appended to the terminal's environment from the settings. |
| 43 | + "env": { "foo": "bar" }, |
| 44 | + // Current working directory to spawn the command into, defaults to current project root. |
| 45 | + //"cwd": "/path/to/working/directory", |
| 46 | + // Whether to use a new terminal tab or reuse the existing one to spawn the process, defaults to `false`. |
| 47 | + "use_new_terminal": false, |
| 48 | + // Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish, defaults to `false`. |
| 49 | + "allow_concurrent_runs": false, |
| 50 | + // What to do with the terminal pane and tab, after the command was started: |
| 51 | + // * `always` — always show the task's pane, and focus the corresponding tab in it (default) |
| 52 | + // * `no_focus` — always show the task's pane, add the task's tab in it, but don't focus it |
| 53 | + // * `never` — do not alter focus, but still add/reuse the task's tab in its pane |
| 54 | + "reveal": "always", |
| 55 | + // Where to place the task's terminal item after starting the task: |
| 56 | + // * `dock` — in the terminal dock, "regular" terminal items' place (default) |
| 57 | + // * `center` — in the central pane group, "main" editor area |
| 58 | + "reveal_target": "dock", |
| 59 | + // What to do with the terminal pane and tab, after the command had finished: |
| 60 | + // * `never` — Do nothing when the command finishes (default) |
| 61 | + // * `always` — always hide the terminal tab, hide the pane also if it was the last tab in it |
| 62 | + // * `on_success` — hide the terminal tab on task success only, otherwise behaves similar to `always` |
| 63 | + "hide": "never", |
| 64 | + // Which shell to use when running a task inside the terminal. |
| 65 | + // May take 3 values: |
| 66 | + // 1. (default) Use the system's default terminal configuration in /etc/passwd |
| 67 | + // "shell": "system" |
| 68 | + // 2. A program: |
| 69 | + // "shell": { |
| 70 | + // "program": "sh" |
| 71 | + // } |
| 72 | + // 3. A program with arguments: |
| 73 | + // "shell": { |
| 74 | + // "with_arguments": { |
| 75 | + // "program": "/bin/bash", |
| 76 | + // "args": ["--login"] |
| 77 | + // } |
| 78 | + // } |
| 79 | + "shell": "system", |
| 80 | + // Whether to show the task line in the output of the spawned task, defaults to `true`. |
| 81 | + "show_summary": true, |
| 82 | + // Whether to show the command line in the output of the spawned task, defaults to `true`. |
| 83 | + "show_command": true |
| 84 | + // Represents the tags for inline runnable indicators, or spawning multiple tasks at once. |
| 85 | + // "tags": [] |
| 86 | + } |
| 87 | +] |
0 commit comments