I cannot believe that it took this long to write a test for this.
This commit is contained in:
@@ -8,7 +8,7 @@ return {
|
|||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
-- Import lspconfig plugin
|
-- Import lspconfig plugin
|
||||||
local lspconfig = require('lspconfig')
|
local lspconfig = vim.lsp.config
|
||||||
-- Import cmp_nvim_lsp plugin
|
-- Import cmp_nvim_lsp plugin
|
||||||
local cmp_nvim_lsp = require('cmp_nvim_lsp')
|
local cmp_nvim_lsp = require('cmp_nvim_lsp')
|
||||||
-- Set options
|
-- Set options
|
||||||
@@ -129,16 +129,23 @@ return {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local lspsetup = function(server, config)
|
local lspsetup = function(server, config)
|
||||||
lspconfig[server].setup({
|
lspconfig[server] = {
|
||||||
handlers = handlers,
|
handlers = handlers,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
settings = config,
|
settings = config,
|
||||||
})
|
}
|
||||||
|
vim.lsp.enable(server)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local simple_servers = {
|
||||||
-- Configure bash language server
|
-- Configure bash language server
|
||||||
lspsetup("bashls")
|
"bashls",
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, server in ipairs(simple_servers) do
|
||||||
|
lspsetup(server)
|
||||||
|
end
|
||||||
|
|
||||||
local lua_config = {
|
local lua_config = {
|
||||||
Lua = {
|
Lua = {
|
||||||
|
|||||||
Reference in New Issue
Block a user