add MasonInstallAll command to install ensure_installed lsps

This commit is contained in:
krolxon 2023-12-30 22:12:34 +05:30
parent 42b49bb7c2
commit e88d6d0165
2 changed files with 4 additions and 3 deletions

View File

@ -1,8 +1,5 @@
local options = {
ensure_installed = { "lua-language-server", "rust_analyzer" }, -- not an option from mason.nvim
PATH = "skip",
ui = {
icons = {
package_pending = "",

View File

@ -97,6 +97,10 @@ local plugins = {
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUninstall", "MasonUninstallAll", "MasonLog" },
config = function()
require "plugins.configs.mason"
local ensure_installed = { "lua-language-server", "rust-analyzer", "pyright", "clangd", "html-lsp" } -- not an option from mason.nvim
vim.api.nvim_create_user_command("MasonInstallAll", function()
vim.cmd("MasonInstall " .. table.concat(ensure_installed, " "))
end, {})
end,
},