Closed igbanam closed 5 months ago
When should vim-plug call the function? For that to work, vim-plug needs to call the function on every Vim event, and that is neither possible nor practical.
To load a plugin on a custom event, see https://github.com/junegunn/vim-plug/wiki/tips#loading-plugins-manually
We currently have on-demand loading for Plug triggers and for filetypes. I think it may be beneficial to have some generic on-demand loading.
Usage would be something like so
This is just one example. Ideally, people should be able to craft any set of preconditions to load a plugin. The only requirement maybe could be that the function referenced in the
'when'
clause must meet two strict requirementsg:FuncName
bool