diff --git a/extensions/slash-commands-example/README.md b/extensions/slash-commands-example/README.md index ad2412adb5..6ff00dd2ad 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-APACHE echo "# Zed Slash Commands Example Extension" > README.md echo "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