Make lspconfig auto setup upon MasonInstall
This commit is contained in:
parent
0855935763
commit
2665b719de
|
@ -13,6 +13,8 @@ M.treesitter = {
|
||||||
"cpp",
|
"cpp",
|
||||||
"markdown",
|
"markdown",
|
||||||
"markdown_inline",
|
"markdown_inline",
|
||||||
|
"rust",
|
||||||
|
"svelte",
|
||||||
},
|
},
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
|
@ -48,6 +50,31 @@ M.mason = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
M.mason_lspconfig = {
|
||||||
|
ensure_installed = {},
|
||||||
|
automatic_installation = true,
|
||||||
|
handlers = {
|
||||||
|
function (server_name)
|
||||||
|
require("lspconfig")[server_name].setup{
|
||||||
|
on_attach = require("plugins.configs.lspconfig").on_attach,
|
||||||
|
capabilities = require("plugins.configs.lspconfig").capabilities,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
|
||||||
|
["lua_ls"] = function ()
|
||||||
|
require("lspconfig").lua_ls.setup {
|
||||||
|
settings = {
|
||||||
|
Lua = {
|
||||||
|
diagnostics = {
|
||||||
|
globals = { "vim" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-- git support in nvimtree
|
-- git support in nvimtree
|
||||||
M.nvimtree = {
|
M.nvimtree = {
|
||||||
git = {
|
git = {
|
||||||
|
|
|
@ -4,7 +4,6 @@ local overrides = require("custom.configs.overrides")
|
||||||
local plugins = {
|
local plugins = {
|
||||||
|
|
||||||
-- Override plugin definition options
|
-- Override plugin definition options
|
||||||
|
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
@ -15,17 +14,23 @@ local plugins = {
|
||||||
require "custom.configs.null-ls"
|
require "custom.configs.null-ls"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require "plugins.configs.lspconfig"
|
require "plugins.configs.lspconfig"
|
||||||
require "custom.configs.lspconfig"
|
-- Use mason-lspconfig hooks instead
|
||||||
|
-- require "custom.configs.lspconfig"
|
||||||
end, -- Override to setup mason-lspconfig
|
end, -- Override to setup mason-lspconfig
|
||||||
},
|
},
|
||||||
|
|
||||||
-- override plugin configs
|
-- override plugin configs
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
opts = overrides.mason
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
opts = overrides.mason
|
||||||
|
},
|
||||||
|
opts = overrides.mason_lspconfig,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue