local M = { 'williamboman/mason.nvim', cmd = 'Mason', } 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