-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Question] Custom plugins? (extensions?) #49
Comments
Now I also think that wasn't the best decision as it is a bit confusing, but I think it's too late for it to be worth changing, so let's just stick with "plugins". Regarding your main question - do you want to add something generic to possession.nvim itself or rather something custom for your nvim config? If it's the second one, then you can just use the user hooks ( |
I was just wondering if it's possible to create plugins that are distributed externally to this repo. I am happy to use user hooks for now, but if I wanted to distribute my plugin to other people who use possession.nvim, without merging a PR into the main repo (since it might be something really niche, that doesn't need to be part of the canonical possession distribution) |
Ok, now I understand. Currently it's not possible, but I guess it could be nice to have such option. So my initial idea would be as follows:
What do you think? |
Your idea would work for minimal changes to posession, however I think ultimately it'd be better to have something more akin to telescope's plugin model, where the consumer uses this syntax, e.g. require('telescope').load_extension('my-plugin') Since it's more generic, doesn't require knowledge of the architecture within, e.g. plugin ordering, table structure to pass in, etc. |
I'd like to add my own plugin that uses the hooks and adds its own
plugin_data
to the session.For example if you wanted to give open tabs custom names, and store them in the session JSON file.
I've looked through the code and I can't see any way to add to the
plugins
array?A better name for this might be 'extensions', similar to telescope.
The text was updated successfully, but these errors were encountered: