Feat(nvim): add mason_tool_installer
This commit is contained in:
parent
fa519bd74d
commit
39a18835a1
@ -1,25 +1,38 @@
|
|||||||
return {
|
return {
|
||||||
'VonHeikemen/lsp-zero.nvim',
|
"VonHeikemen/lsp-zero.nvim",
|
||||||
branch = 'v3.x',
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{'neovim/nvim-lspconfig'},
|
{ "neovim/nvim-lspconfig" },
|
||||||
{'williamboman/mason.nvim'},
|
{ "williamboman/mason.nvim" },
|
||||||
{'williamboman/mason-lspconfig.nvim'},
|
{ "williamboman/mason-lspconfig.nvim" },
|
||||||
},
|
{ "WhoIsSethDaniel/mason-tool-installer.nvim" },
|
||||||
config = function ()
|
},
|
||||||
local lsp_zero = require('lsp-zero')
|
config = function()
|
||||||
lsp_zero.on_attach(function(client, bufnr)
|
local lsp_zero = require("lsp-zero")
|
||||||
-- see :help lsp-zero-keybindings
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
-- to learn the available actions
|
-- see :help lsp-zero-keybindings
|
||||||
lsp_zero.default_keymaps({buffer = bufnr})
|
-- to learn the available actions
|
||||||
end)
|
lsp_zero.default_keymaps({ buffer = bufnr })
|
||||||
|
end)
|
||||||
|
|
||||||
require('mason').setup({})
|
require("mason").setup({})
|
||||||
require('mason-lspconfig').setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = {},
|
ensure_installed = {},
|
||||||
handlers = {
|
handlers = {
|
||||||
lsp_zero.default_setup,
|
lsp_zero.default_setup,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end
|
local mason_tool_installer = require("mason-tool-installer")
|
||||||
|
|
||||||
|
mason_tool_installer.setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"prettier", -- prettier formatter
|
||||||
|
"stylua", -- lua formatter
|
||||||
|
"isort", -- python formatter
|
||||||
|
"black", -- python formatter
|
||||||
|
"flake8", -- python linter
|
||||||
|
"eslint_d", -- js linter
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user