Closed arch-spatula closed 3 months ago
https://github.com/WhoIsSethDaniel/mason-tool-installer.nvim
위 플러그인이 더 적절해보입니다.
포멧터만 설치하는 플러그인 말고 린터도 같이 설치해야 합니다.
https://github.com/dreamsofcode-io/neovim-python/blob/main/plugins.lua
직접 설치하는 방법도 있는 것 같습니다.
:MasonInstallAll
위와 같은 커맨드는 없습니다.
https://github.com/NvChad/NvChad/blob/v2.5/lua/nvchad/plugins/init.lua
-- nvchad/configs/mason.lua
local options = {
ensure_installed = { "lua-language-server", 'stylua' }, -- not an option from mason.nvim
PATH = "skip",
ui = {
icons = {
package_pending = " ",
package_installed = " ",
package_uninstalled = " ",
},
keymaps = {
toggle_server_expand = "<CR>",
install_server = "i",
update_server = "u",
check_server_version = "c",
update_all_servers = "U",
check_outdated_servers = "C",
uninstall_server = "X",
cancel_installation = "<C-c>",
},
},
max_concurrent_installers = 10,
}
return options
-- lsp stuff
{
"williamboman/mason.nvim",
cmd = { "Mason", "MasonInstall", "MasonInstallAll", "MasonUpdate" },
opts = function()
return require "nvchad.configs.mason"
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "mason")
require("mason").setup(opts)
-- custom nvchad cmd to install all mason binaries listed
vim.api.nvim_create_user_command("MasonInstallAll", function()
if opts.ensure_installed and #opts.ensure_installed > 0 then
vim.cmd("MasonInstall " .. table.concat(opts.ensure_installed, " "))
end
end, {})
vim.g.mason_binaries_list = opts.ensure_installed
end,
},
nvchad에서 발견한 설정입니다.
https://github.com/jay-babu/mason-null-ls.nvim?tab=readme-ov-file#configuration
당연한 말이지만 none-ls를 활용하도록 합니다.