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
8.02k stars 282 forks source link

Support ensure_installed directly in mason #1713

Open Limero opened 6 months ago

Limero commented 6 months ago

I've searched open issues for similar requests

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

As a follow-up to https://github.com/williamboman/mason.nvim/issues/483 which adds the ensure_installed option to mason-lspconfig. It would be great if the same functionality could be added to mason itself. I prefer to set up my lsps manually without the use of lspconfig and would want mason to just automatically install them, nothing else.

Describe the solution you'd like

ensure_installed being an option on mason.nvim without requring the use of mason-lspconfig.nvim.

To support the following:

require("mason").setup {
    ensure_installed = {
      "lua_ls",
      "rust_analyzer",
    },
}

Describe potential alternatives you've considered

No response

Additional context

No response

ryuheechul commented 1 month ago

for me, the motivation for this feature is to ensure installed for things other than lsp, like formatter, dap, linters, etc. since there is support for ensure_installed at https://github.com/williamboman/mason-lspconfig.nvim but I couldn't find anything similar for formatter, etc.