Certainly! Here’s the Emacs Org format version of the markdown in English:
This is a template for creating plugins for the Zed editor using cargo-generate
. It supports generating three types of plugins:
- Language Server plugins
- Theme plugins
- Slash Command plugins
Before you begin, ensure you have the following installed:
You can install cargo-generate
with:
cargo install cargo-generate
To use this template and create a new Zed plugin project, run the following command:
cargo generate --git https://github.com/yourusername/zed-plugin-template.git
Follow the prompts to configure your plugin. The generator will ask you questions about:
- Plugin name and description
- Plugin type (Language Server, Theme, or Slash Command)
- License
- GitHub repository details
Based on your answers, it will generate the appropriate files for your plugin type.
The template includes the following key files:
Cargo.toml.liquid
: The Rust project configuration fileextension.toml.liquid
: The Zed extension configuration fileREADME.md.liquid
: A template for the plugin’s READMEsrc/{{lsp_name}}.rs.liquid
: Template for Language Server pluginsthemes/{{plugin_id}}.json.liquid
: Template for Theme pluginssrc/{{slash_command_name}}.rs.liquid
: Template for Slash Command plugins
After generating your project, you can further customize it by:
- Editing the generated files to add your specific plugin logic
- Updating the README with more detailed information about your plugin
- Adding additional dependencies to
Cargo.toml
if needed
If you’d like to contribute to this template:
- Fork the repository
- Create a new branch for your feature
- Make your changes
- Submit a pull request with a clear description of your improvements
This template is licensed under the MIT OR Apache-2.0 license. See the LICENSE-MIT
and LICENSE-APACHE
files for details.
If you encounter any issues or have questions about using this template, please open an issue in the GitHub repository.
Happy plugin development!