Add static Runnables (#8009)

Part of #7108

This PR includes just the static runnables part. We went with **not**
having a dedicated panel for runnables.
This is just a 1st PR out of N, as we want to start exploring the
dynamic runnables front. Still, all that work is going to happen once
this gets merged.

Release Notes:

- Added initial, static Runnables support to Zed. Such runnables are defined in
`runnables.json` file (accessible via `zed: open runnables` action) and
they can be spawned with `runnables: spawn` action.

---------

Co-authored-by: Kirill Bulatov <kirill@zed.dev>
Co-authored-by: Pitor <pitor@zed.dev>
Co-authored-by: Beniamin <beniamin@zagan.be>
This commit is contained in:
Piotr Osiewicz 2024-02-19 17:41:43 +01:00 committed by GitHub
parent ca251babcd
commit f17d0b5729
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 1394 additions and 275 deletions

View file

@ -53,7 +53,7 @@ impl JsonLspAdapter {
},
cx,
);
let runnables_schema = runnable::static_source::DefinitionProvider::generate_json_schema();
serde_json::json!({
"json": {
"format": {
@ -70,6 +70,10 @@ impl JsonLspAdapter {
{
"fileMatch": [schema_file_match(&paths::KEYMAP)],
"schema": KeymapFile::generate_json_schema(&action_names),
},
{
"fileMatch": [schema_file_match(&paths::RUNNABLES)],
"schema": runnables_schema,
}
]
}