Add task docs and default keybindings (#8123)

Also group task source modules together

Release Notes:

- N/A

---------

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This commit is contained in:
Kirill Bulatov 2024-02-21 16:43:56 +02:00 committed by GitHub
parent b9151b9506
commit 0c939e5dfc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 84 additions and 64 deletions

21
docs/src/tasks.md Normal file
View file

@ -0,0 +1,21 @@
# Tasks
Zed supports ways to spawn (and rerun) commands using its integrated terminal to output the results.
Currently, two kinds of tasks are supported, but more will be added in the future.
## Static tasks
Tasks, defined in a config file (`tasks.json` in the Zed config directory) that do not depend on the current editor or its content.
Config file can be opened with `zed::OpenTasks` action ("zed: open tasks" in the command palette), it will have a configuration example with all options commented.
Every task from that file can be spawned via the task modal, that is opened with `task::Spawn` action ("tasks: spawn" in the command pane).
Last task spawned via that modal can be rerun with `task::Rerun` ("tasks: rerun" in the command palette) command.
## Oneshot tasks
Same task modal opened via `task::Spawn` supports arbitrary bash-like command execution: type a command inside the modal, and use `cmd-enter` to spawn it.
Task modal will persist list of those command for current Zed session, `task::Rerun` will also rerun such tasks if they were the last ones spawned.