diff --git a/nvim/custom/chadrc.lua b/nvim/custom/chadrc.lua index 579cdd2..3a17725 100644 --- a/nvim/custom/chadrc.lua +++ b/nvim/custom/chadrc.lua @@ -6,7 +6,11 @@ M.plugins = { override = { ["nvim-treesitter/nvim-treesitter"] = override.treesitter, }, - + options = { + lspconfig = { + setup_lspconf = "custom.plugins.lspconfig" + }, + }, user = require "custom.plugins", } diff --git a/nvim/custom/plugins/lspconfig.lua b/nvim/custom/plugins/lspconfig.lua new file mode 100644 index 0000000..69cc6df --- /dev/null +++ b/nvim/custom/plugins/lspconfig.lua @@ -0,0 +1,17 @@ +local M = {} + +M.setup_lsp = function(attach, capabilities) + local lspconfig = require "lspconfig" + + -- lspserver with default config + local servers = { "html", "cssls", "gopls"} + + for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + on_attach = attach, + capabilities = capabilities, + } + end +end + +return M