Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
slash_commands_example: Improve setup instructions in README (#26217)
Chris Boetteaef25a3bc362
diff --git a/extensions/slash-commands-example/README.md b/extensions/slash-commands-example/README.mdindex ad2412adb5c..6ff00dd2ad6 100644--- a/extensions/slash-commands-example/README.md+++ b/extensions/slash-commands-example/README.md@@ -20,7 +20,22 @@ cp -RL zed/extensions/slash-commands-example .cd slash-commands-example/-sed -i '' '/\[lints]/,/^$/s/^workspace/#&/' Cargo.toml+# Update Cargo.toml to make it standalone+cat > Cargo.toml << EOF+[package]+name = "slash_commands_example"+version = "0.1.0"+edition = "2021"+license = "Apache-2.0"++[lib]+path = "src/slash_commands_example.rs"+crate-type = ["cdylib"]++[dependencies]+zed_extension_api = "0.1.0"+EOF+curl -O https://raw.githubusercontent.com/rust-lang/rust/master/LICENSE-APACHEecho "# Zed Slash Commands Example Extension" > README.mdecho "Cargo.lock" > .gitignore@@ -40,7 +55,7 @@ zed $_1. Open the command palette (`cmd-shift-p` or `ctrl-shift-p`).2. Launch `zed: install dev extension`-3. Select the `slash-commands-example` folder created above+3. Select the extension folder created above## Test@@ -50,7 +65,7 @@ Open the assistant and type `/echo` and `/pick-one` at the beginning of a line.Open the `extensions.toml` file and set the `id`, `name`, `description`, `authors` and `repository` fields.-Rename `slash-commands-example.rs` you'll also have to update `Cargo.toml+Rename `slash-commands-example.rs` you'll also have to update `Cargo.toml`## Rebuild