nvim-neorocks / rocks.nvim

Neovim plugin management inspired by Cargo, powered by luarocks
GNU General Public License v3.0
578 stars 8 forks source link

cooldown before repopulating the cache #454

Open teto opened 2 weeks ago

teto commented 2 weeks ago

seems like rocks.nvim fetches several manifests on each startup. Now I am sometimes on a laptop with limited battery/connectivity and I think it's too much. Even on desktop.

There is a related setting: {lazy?} (boolean) Whether to query luarocks.org lazily. but I think it might be worth introducing some complexity to avoid the current dilemna between "wasteful" or "too late".

One proposition is to rename the vague lazy setting to something more precise, e.g., plugin_listing_cache_strategy and accept a string instead of a boolean (or enum or integer) to be able to:

I also wondered if there was already a command to refresh the cache ? Maybe it's not important as it's just used for autocompletion and we can try installing a plugin not present in the cached manifest ?

mrcjkb commented 2 weeks ago

some way to set a timeout after which the cache should be asked again.

We could do what rocks does, which is:

But this should be implemented in luarocks, not rocks.nvim.