nvim/lua/config/plugins/mason.lua

50 lines
784 B
Lua
Raw Normal View History

2022-12-31 17:43:31 +01:00
local M = {
'williamboman/mason.nvim',
}
M.tools = {
'clang-format',
'clangd',
'gopls',
-- 'lua-language-server',
'rust-analyzer',
'prettierd',
-- 'stylua',
'shellcheck',
'shfmt',
'black',
}
function M.check()
local mr = require 'mason-registry'
for _, tool in ipairs(M.tools) do
local p = mr.get_package(tool)
if not p:is_installed() then
p:install()
end
end
end
function M.config()
require('mason').setup {
settings = {
ui = {
border = 'rounded',
icons = {
package_installed = '',
package_pending = '',
package_uninstalled = '',
},
},
log_level = vim.log.levels.INFO,
max_concurrent_installers = 4,
},
}
M.check()
require('mason-lspconfig').setup {
automatic_installation = false,
}
end
return M