Proper way to install plugins with a function from that plugin
Th3Whit3Wolf opened this issue · 6 comments
I have read through the issues and from my understanding the vim's package manager works is newly installed plugins aren't added into runtime until the next time vim is opened.
Is there any way to reload the runtime or anyway to use that plugins function without exiting vim?
This is a problem in firenvim: https://github.com/glacambre/firenvim/blob/fa79a10fdb302bce341c6cc6a21ddc1263faebdc/README.md#pre-built
We found a solution for firenvim: https://github.com/glacambre/firenvim/blob/f47791f01a215b6722d426d0cf697b96e383d5d9/README.md#pre-built
I don't think there is any acceptable fix here and this issue can be closed. The best solution IMO is this "workaround".
@Th3Whit3Wolf this might be useful for you #74 (comment)
Workaround as discussed by @NilsIrl here
call minpac#add('pluginauthor/plugin', { 'type': 'opt', 'do': 'packadd plugin | call plugin#function()'})
Obvious short comings of this approach is that this means you must load the plugin on its own or setup an autoload function.
If you need the plugin on (neo)vim startup then I recommend add this to your vimrc
autocmd VimEnter * packadd plugin
If you need the plugin on (neo)vim startup then I recommend add this to your vimrc
autocmd VimEnter * packadd plugin
I would just put the following in your .vimrc
:
packadd plugin
If you need the plugin on (neo)vim startup then I recommend add this to your vimrc
autocmd VimEnter * packadd pluginI would just put the following in your
.vimrc
:packadd plugin
Yeah that's definitely the more easy obvious solution, I'm not sure why that wasn't the first thing that popped into my head