Remix.run Logo
shmerl 5 days ago

Neat, but it's missing ability to lazy load plugins. I'm using lazy.nvim which is both lazy loader and update manager and it's really great.

azemetre 5 days ago | parent | next [-]

On the neovim subreddit one of the core maintainers said that relying on users to lazy load plugins is an extremely poor practice and something that should be done by the author's of said plugins. It is just a matter of how you initialize your plugin/name-of-plugin.lua file.

Don't know if it helps but I recently migrated to vim.pack. With another neovimmer he helped me create a defer function and pack update. The only plugin I initially load is a dashboard while deferring everything else. Brought my startup time to sub 100ms.

https://github.com/azemetre/dotfiles/pull/61/files

shmerl 5 days ago | parent [-]

I don't understand that argument (and I've heard it several times), see comment below about plugins dependencies. I.e. that argument is OK for isolated cases, not for more complex dependency graph.

azemetre 5 days ago | parent [-]

This is the reddit thread where the lead of the project talks about it:

https://www.reddit.com/r/neovim/comments/1n2nax0/why_vimpack...

It doesn't answer your question about plugin dependencies (although vim.pack lets you handle this), but it might give you more insight on where vim.pack will go in the future.

robinsonrc 5 days ago | parent | prev [-]

Depending on the number of plugins you have, you may not notice the difference in practice. I certainly don’t but I’m very much on the minimal side of things. This all said I’m definitely of the school of thought that plugin developers should be responsible for ensuring their plugins are lazy loaded, rather than leaving it up to the user, who is not as well placed to make the decision.

shmerl 5 days ago | parent [-]

Well, it might work for individual plugins, but it can't work for when you use plugins as extensions for other plugins. How would plugin A know it has to load B (which is an extension of A) as a prerequisite for [lazy] loading itself?

Basically, only plugin manager can have a sane graph of plugins dependencies and know how to load them because that graph is in the end defined by the user (for the plugin manager) and plugins themselves have no clue what user might want.