plug.kak
plug.kak copied to clipboard
Add option to skip rebuilding and load prebuilt plugin configuration
We should detect if the plugin has an entry in the build directory and skip the build process altogether. The rebuild can be invoked manually with plug-rebuild [<plugin>] command. If no plugin is given, rebuild all plugins.
This has a potential problem of the build being unsynchronized with what's in the user's kakrc, so this should not be on by default and controlled with plug_auto_rebuild option.
Rebuilding can be probably triggered via a hook on saving the buffer to prevent configuration desync. Such hook should be set up by the user.
You could also save the list of .kak files to be sourced for each plugin, to avoid the numerous find's. I believe this is what cork does.. A git post-update hook could create a .build/repo/outdated file (which, when present, triggers a rebuild) — or something like that.
As far as the kakrc sync problem you mention, it's more complicated, since kakrc can source other files which in turn call plug (e.g. I have an autoload.parts directory which sources files in Linux run-parts order).