-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Description
There are several areas where behavior of vim.pack.add()
can be improved:
-
Make it enforce plugin state on disk to be the one specified in plugin spec. I.e. enforce
spec.src
andspec.version
. This allows a more straightforward switching to different branch/tag/version: edit 'init.lua' and:restart
. Currently it requires extra step ofvim.pack.update()
(which needs internet connection) to "sync" plugin on disk with to have properversion
.To not affect startup performance, this requires having a persistent on-disk storage of the plugin state (to be able to even detect the value change).
The cost of this "enforce state" approach is that users can not see beforehand and confirm/deny which changes will be applied. They would still be present in the log file for inspection, though. Relevant discussion is here.
-
Decide how to treat several
vim.pack.add()
calls for the same plugin in the same session. Should it always force the state on disk or should it error for any second+ call for the same plugin (forcing to go "edit init.lua and restart" route)?