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.22k stars 258 forks source link

Lockfile or ability to freeze a certain package version #1701

Open mguellsegarra opened 1 month ago

mguellsegarra commented 1 month ago

I've searched open issues for similar requests

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

The issue relates to the lack of a feature in mason.nvim that would allow for the consistent management of tool versions across different environments or over time -- version lock or mason lock file.

Recently, an update to a tool I rely on (eslint-lsp, see https://github.com/neovim/nvim-lspconfig/issues/3146) automatically updated through mason.nvim, causing my established development workflow to break unexpectedly. This problem highlights the need for a mechanism to lock or pin specific versions of packages to prevent automatic updates that might introduce breaking changes.

Describe the solution you'd like

I would like mason.nvim to support either a lockfile mechanism or a way to specify and freeze the versions of packages that it manages. This feature would function similarly to npm's package-lock.json or yarn's yarn.lock, ensuring that once a package version is installed, it remains the same across installations until explicitly upgraded. This could be implemented as an additional option in the Mason configuration where users can pin the package versions they install.

Describe potential alternatives you've considered

No response

Additional context

No response

varac commented 1 month ago

Related issues: https://github.com/williamboman/mason.nvim/issues/425, https://github.com/williamboman/mason.nvim/issues/832

zapling commented 1 month ago

Duplicate of https://github.com/williamboman/mason.nvim/issues/731.

I have written a plugin for this while we are waiting for an official solution https://github.com/zapling/mason-lock.nvim