-
-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better plugin configuration #661
Comments
Thank you for taking the time creating this issue and the pr!
This looks good, I am not sure if that already maybe limits us in a way. The tag alias is a great idea, so if I understand that correctly you could run A future plan is also to make it possible to configure plugins in the config itself,
Agreed, if there is no issue for that already do you mind opening a separate one for that? |
Hey @a-kenji, thanks for the feedback.
That's a good idea, even if only to leave room in the future for adding options for configuring all plugins. I can't think of anything to put there right now though. The only option that cuts across all plugins is the lookup directory for plugins, which is handled by the
Yup. Zellij will crash if the tag names aren't unique, but you can pass different tag names for the same wasm file to adjust the plugins for different configurations.
I'm not sure what you mean here?
Another good idea. Being able to specify a different plugin configuration in the layout files at the point of instantiation would be helpful. I should ask though, given how unfinished the plugin system is, is there any hivemind consensus on how plugins should work when they're fully implemented? I'm sure my current draft pr is pretty off from that, most of what's implemented was just necessary to get my toy plugin working. I'm happy to further iterate on this design and the pull request. |
Implemented in #2646 |
Before many of the items on the wish list for plugins can be completed Zellij needs a way for plugin metadata to be declared. Right now the only way to load a plugin is to specify a path in the context of a layout pane. Defining plugins inside of layout files feels insufficient for things like headless plugins which wont affect layout, or specifying allowed permissions for plugins.
I've got a pull request that implements a plugin manifest inside Zellij's config file. Additionally, I've also included the ability to pass configuration options into plugins. As well as headless plugins.
The API for designating plugins in the config.yaml file looks like this:
While the updated API for the plugins looks like this:
I'm still not happy with that pr though. All of the configuration for plugins is currently happening by the user consuming the plugin. It might be necessary for plugins to specify configuration of their own. For instance, when the permissions system is implemented, a plugin author is going to need the ability to request permissions, and the user of the plugin is going to have to grant/deny access to said permissions. For that, a separate manifest file is likely needed to be added in front of the wasm plugins that specifies configuration provided by the plugin author. For now though, it's not completely necessary.
Feedback on the API design would be appreciated.
The text was updated successfully, but these errors were encountered: