1
0

fix: update lspconfig

This commit is contained in:
Rokas Puzonas 2021-11-01 16:13:43 +02:00
parent 5fd0db584c
commit fc7c15fd84
3 changed files with 26 additions and 5 deletions

View File

@ -19,7 +19,7 @@ cmp.setup{
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm({
behavior = cmp.ConfirmBehavior.Replace,
behavior = cmp.ConfirmBehavior.Insert,
select = true,
})
},

View File

@ -16,9 +16,23 @@ M.server_settings = {
{ formatCommand = "lua-format -i", formatStdin = true }
}
}
}
},
-- sumneko_lua = {
-- "Lua.runtime.version": "LuaJIT",
-- "Lua.workspace.library": ["${3rd}/love2d/library"],
-- "Lua.workspace.checkThirdParty": false,
-- "Lua.diagnostics.disable": ["undefined-field"]
sumneko_lua = {
Lua = {
-- runtime = {
-- version = "LuaJIT"
-- },
-- workspace = {
-- checkThirdParty = false,
-- library = {"${3rd}/love2d/library"}
-- }
-- }
-- Lua = {
-- runtime = {
-- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
@ -35,8 +49,8 @@ M.server_settings = {
-- library = vim.api.nvim_get_runtime_file("", true)
-- },
-- telemetry = { enable = false }
-- }
-- }
}
}
}
-- Apply general settings for each server

View File

@ -15,7 +15,14 @@ end
local capabilities = lspconfig_config.get_capabilities()
lsp_instller.on_server_ready(function(server)
-- print(server.name)
-- print(vim.inspect(lspconfig_config.get_server_settings(server.name)))
server:setup{
root_dir = function()
return vim.fn.getcwd()
end,
init_options = lspconfig_config.get_server_init_options(server.name),
on_attach = lspconfig_config.on_attach,
on_init = lspconfig_config.on_init,