starter/lua/plugins/mason.lua

40 lines
896 B
Lua
Raw Normal View History

2024-02-18 11:32:10 +08:00
return {
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
2025-02-21 11:13:26 +08:00
dependencies = { "williamboman/mason-lspconfig.nvim" },
config = function()
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = { "lua_ls" },
})
end,
2024-02-18 11:32:10 +08:00
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
2025-02-21 11:13:26 +08:00
{
"neovim/nvim-lspconfig",
config = function()
require("lspconfig").lua_ls.setup({
settings = {
Lua = {
diagnostics = {
globals = { "vim" }, -- Avoid "undefined global 'vim'"
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = { enable = false },
},
},
})
end,
},
2024-02-18 11:32:10 +08:00
}