diff --git a/lua/konsthol/plugins/lsp/lsp.lua b/lua/konsthol/plugins/lsp/lsp.lua index 6163de8..89c3eac 100644 --- a/lua/konsthol/plugins/lsp/lsp.lua +++ b/lua/konsthol/plugins/lsp/lsp.lua @@ -8,7 +8,7 @@ return { }, config = function() -- Import lspconfig plugin - local lspconfig = require('lspconfig') + local lspconfig = vim.lsp.config -- Import cmp_nvim_lsp plugin local cmp_nvim_lsp = require('cmp_nvim_lsp') -- Set options @@ -129,16 +129,23 @@ return { } local lspsetup = function(server, config) - lspconfig[server].setup({ + lspconfig[server] = { handlers = handlers, on_attach = on_attach, flags = lsp_flags, settings = config, - }) + } + vim.lsp.enable(server) end + local simple_servers = { -- Configure bash language server - lspsetup("bashls") + "bashls", + } + + for _, server in ipairs(simple_servers) do + lspsetup(server) + end local lua_config = { Lua = {