folke / lazy.nvim

💤 A modern plugin manager for Neovim
https://lazy.folke.io/
Apache License 2.0
15.08k stars 365 forks source link

feature: `restore` plugins by default #1817

Open sigasigasiga opened 1 week ago

sigasigasiga commented 1 week ago

Did you check the docs?

Is your feature request related to a problem? Please describe.

As nearly all of us, I store my dotfiles in a git repo. lock-file.json is stored under version control too. However, if I clone my setup to a new machine, open up neovim, Lazy begins to install the latest version of each plugin automatically and overwrites the lockfile.

To get the locked versions after that I need:

  1. git restore path/to/lockfile
  2. nvim -> :Lazy restore

which is quite inconvenient

Describe the solution you'd like

If lockfile exists then restore all the plugins, otherwise install the newest version. If a plugin is listed in the spec but is not in the lockfile, then install the latest version and update the lockfile

Describe alternatives you've considered

  1. git restore path/to/lockfile
  2. nvim -> :Lazy restore

Additional context

No response

stoicon commented 19 hours ago

1804

(How to use the Lock file when lazy.nvim loads for the first time?)