-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add "post-activate-hook" support to addon-info.json #142
Comments
Of course, very few if any addons should be using a mechanism like this, and there's definitely the potential for it to be abused. I think the fact that hooks are only a single command helps by at least making it slightly awkward to do a bunch of heavy operations. A big warning to not abuse it in the docs would also go a long way. |
Note that actual activation does not necessary happen when |
If plugins need "setup" and pulgin/.pvim or after/plugin/ files don't help I recommend introducing a Setup() like function in those plugins so that plugins who depend on it can force the setup. vam's AcitvateAddons function has an force_loading_plugins_now option, too. If this is not enough we should discuss the use case. |
In a few cases, it's useful for addons to be able to execute code as soon as possible after they're activated. It would be nice to have support for a "post-activate-hook".
For example, plugins that provide sensible default settings like tpope/vim-sensible should execute their settings modifications as soon as possible so the user has a chance to override any settings in their .vimrc (otherwise, the modifications always happen after vimrc time and can only be overridden using a file in after/).
The text was updated successfully, but these errors were encountered: