From conversations with @bfredl, @clason, and others, it may be worth investigating using "traditional" rtp-based plugin management instead of native packages (mostly to get around the annoying sourcing order problem).
This would entail:
packpathrtp value, to be sourced in initrtp value based on the set of plugins to be loaded eagerlypackadd for lazy-loadingrtps, potentially by merging plugin directories like dein?馃 I thought native package is the best way to go with regards to performance. I will look more into rtp.
Thanks for the update
@tami5: That had been my thinking too, but the others raised some valid points that this may not be the case (or may be easily fixed if it is the case) in discussion on Gitter.
Figure out how to make short rtps, potentially by merging plugin directories like dein?
If it helps, we will make neovim core handle long rtp:s better :]
This could be done by changing the internal _representation_ of &rtp from a ridicously long string option, to an _array of strings_, which can be manipulated/inspected/debugged directly from lua code. We can even make it callback-driven (to lazy load things "smartly"), given Sufficiently Smart caching logic (which is how I do lua callbacks for :highlight definitions already).
@bfredl: Am I correct in believing that https://github.com/neovim/neovim/pull/13119 only affects Lua start plugins, not Vimscript plugins? Meaning that changing to rtp-based management is now less important, but not completely irrelevant?
@wbthomason my _intention_ was to also support vimscript plugins but it looks to be a bit messy to do it "perfectly". At very least we will support autoload/ calls during init.vim for vimscript plugins that use autoload for config (but don't need all messy details of runtime during init). It could make sense to wait a few days as people try it out (and I fix remaining bugs :)
Sounds good, thank you for the patches! I'm happy about anything that gets me speed while saving me from having to do crazy cleverness with the rtp. :grinning:
Most helpful comment
This could be done by changing the internal _representation_ of
&rtpfrom a ridicously long string option, to an _array of strings_, which can be manipulated/inspected/debugged directly from lua code. We can even make it callback-driven (to lazy load things "smartly"), given Sufficiently Smart caching logic (which is how I do lua callbacks for:highlightdefinitions already).