williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.24k stars 258 forks source link

Lockfile support #731

Open sarmong opened 1 year ago

sarmong commented 1 year ago

I've searched open issues for similar requests

Yes

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

Sometimes formatters change how they work and updating them results in an unnecessary diff.

Describe the solution you'd like

It would be great to add a function to generate a lockfile that will describe installed packages with their version.

Packer is already working on supporting this.

This feature would add more stability to one's neovim configuration and less worry that something will break if you reinstall your OS or install neovim on a different machine.

Describe potential alternatives you've considered

Specifying each package manually is a tedious work. Besides, I use null-ls plugin that automatically detects what needs to be installed.

"Just don't update" won't work, because I need the versions persist on any computer I am working on.

Additional context

No response

williamboman commented 1 year ago

Update: I'm working on this atm. The plan is to mimic lazy.nvim's lockfile mechanism so that it is somewhat familiar to users. I'll cut the 1.0.0 release of mason.nvim prior to adding this though.

williamboman commented 1 year ago

Update: I'm still working on this and have a feature branch locally which I'm not too happy with yet. I think I'll try to get a first implementation merged soon and make it opt-in and tag it as experimental and gather user feedback in order to guide additional features and shortfalls.

zapling commented 6 months ago

Any updates on this? This would be such a helpful feature to keep track of things and ensuring your dev environment works as intended across machines, thanks for your hard work on mason :heart:

zapling commented 5 months ago

I have implemented a lockfile mechanism that works for my use case, hopefully this is to some help for people waiting here https://github.com/zapling/mason-lock.nvim

drewgingerich commented 2 months ago

I'd love to be able to commit a Mason lockfile alongside my nvim config so that when I move to a different computer Mason can automatically install everything I installed on the other machine, with matching versions. Jumping between my work and personal laptop, I keep forgetting to install one thing or another. Installing is a breeze with Mason, though!