Skip to content
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

Ordering & "after/" #10

Open
SevereOverfl0w opened this issue Jul 2, 2018 · 0 comments
Open

Ordering & "after/" #10

SevereOverfl0w opened this issue Jul 2, 2018 · 0 comments

Comments

@SevereOverfl0w
Copy link

Zen doesn't include the after/ directory from a plugin on the rtp.

I looked into adding this but zen appends directly onto the rtp.
I've done some follow-up research into this, and discovered junegunn/vim-plug#615.
The linked issues inside are also relevant.

The summary is that ordering is really important with the rtp.
The order is:

  • original rtp at beginning, as spellfile writes there by default
  • pluginA, pluginB
  • pluginA/after, pluginB/after
  • end of rtp to begin with (home/dominic/.config/nvim/after for me) to allow users to override settings from plugins

These are just things I figured out from looking at vim-plug.
It might be more insightful to look at vim8's packaging feature, as that performs this ordering.
vim8 is more likely to be a canonical source of information.

These options I've been able to come up with:

  • It is possible to match the ordering of vim-plug by using splitting on the rtp.
    Junegunn hasn't looked into the performance impacts of that though, it may not be viable.
  • Convert &rtp at first into a list, and then on every zen#add call, update both the list and the 'rtp' setting. (maybe with a function to indicate manual update to &rtp?)
  • Switch to a vim-plug zen#begin and zen#end, but if you wanted to do that you'd already be using vim-plug I'd bet!
  • Integrate with vim8's package feature, and let that take care of ordering.
    This would make the plugin be closer to minpac's current feature set.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant