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

feature: restore plugins by default #1817

Closed
1 task done
sigasigasiga opened this issue Nov 18, 2024 · 5 comments
Closed
1 task done

feature: restore plugins by default #1817

sigasigasiga opened this issue Nov 18, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@sigasigasiga
Copy link

sigasigasiga commented Nov 18, 2024

Did you check the docs?

  • I have read all the lazy.nvim 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

@sigasigasiga sigasigasiga added the enhancement New feature or request label Nov 18, 2024
@stoicon
Copy link

stoicon commented Nov 28, 2024

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

Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Dec 29, 2024
@sigasigasiga
Copy link
Author

it has 3 likes and i think we need this

@kyoh86
Copy link
Contributor

kyoh86 commented Dec 29, 2024

#1279 ?

@github-actions github-actions bot removed the stale label Dec 30, 2024
@folke
Copy link
Owner

folke commented Jan 4, 2025

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

That's already how it works. Install missing always uses the lock file.

If you however do Lazy install, then it will not use the lock file.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants