mirror of
https://github.com/zellij-org/zellij.git
synced 2026-09-23 00:02:43 +00:00
* ad plugin override_layout command * watch available layouts and report to plugin thread * Event::AvailableLayoutInfo * save layout command * refactor save_layout * fix api and permissions * delete_layout API command * edit layout in place API * edit layout response through api * propagate layout parsing errors * generate random name plugin api * dump stringified layout API * synchronicity dump_session_layout and include LayoutMetadata in sync response * parse_layout plugin api * fix: default to default layout dir in plugin api * rename_layout plugin command API * initial implementation of multi-tab override * apply to multiple tabs * allow applying to only the active tab * add tab/pane names to layout parsing metadata * indicate is_builtin_plugin in PaneMetadata * get_layout_dir plugin API command * consolidate (and fix) is_builtin_plugin logic * fix bad ret * allow dumping the layout for just a specific tab in the session * get focused pane and tab sync api * color last substring variants * add plugin * update assets * fix tests * add e2e tests for new plugin apis * update ui with new shortcut * rustfmt * docs(changelog): add PR
28 lines
1.1 KiB
Markdown
28 lines
1.1 KiB
Markdown
## About
|
|
|
|
This is an example [Zellij][zellij] plugin in Rust. It can be used as a template to start developing your own plugins.
|
|
|
|
More about Zellij plugins: [Zellij Documentation][docs]
|
|
|
|
[zellij]: https://github.com/zellij-org/zellij
|
|
[docs]: https://zellij.dev/documentation/plugins.html
|
|
|
|
## Development
|
|
|
|
*Note*: you will need to have `wasm32-wasi` added to rust as a target to build the plugin. This can be done with `rustup target add wasm32-wasi`.
|
|
|
|
### With the Provided Layout
|
|
|
|

|
|
|
|
|
|
Run `zellij -l zellij.kdl` at the root of this repository. This will open a development environment that will help you develop the plugin inside Zellij.
|
|
|
|
It can also be used if you prefer developing outside of the terminal - in this case you should ignore the `$EDITOR` pane and use your IDE instead.
|
|
|
|
### Otherwise
|
|
|
|
1. Build the project: `cargo build`
|
|
2. Load it inside a running Zellij session: `zellij action start-or-reload-plugin file:target/wasm32-wasi/debug/rust-plugin-example.wasm`
|
|
3. Repeat on changes (perhaps with a `watchexec` or similar command to run on fs changes).
|