fix: update lspconfig
This commit is contained in:
parent
5fd0db584c
commit
fc7c15fd84
@ -19,7 +19,7 @@ cmp.setup{
|
|||||||
['<C-Space>'] = cmp.mapping.complete(),
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
['<C-e>'] = cmp.mapping.close(),
|
['<C-e>'] = cmp.mapping.close(),
|
||||||
['<CR>'] = cmp.mapping.confirm({
|
['<CR>'] = cmp.mapping.confirm({
|
||||||
behavior = cmp.ConfirmBehavior.Replace,
|
behavior = cmp.ConfirmBehavior.Insert,
|
||||||
select = true,
|
select = true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -16,9 +16,23 @@ M.server_settings = {
|
|||||||
{ formatCommand = "lua-format -i", formatStdin = true }
|
{ 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 = {
|
-- Lua = {
|
||||||
-- runtime = {
|
-- runtime = {
|
||||||
-- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
-- -- 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)
|
-- library = vim.api.nvim_get_runtime_file("", true)
|
||||||
-- },
|
-- },
|
||||||
-- telemetry = { enable = false }
|
-- telemetry = { enable = false }
|
||||||
-- }
|
}
|
||||||
-- }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Apply general settings for each server
|
-- Apply general settings for each server
|
||||||
|
@ -15,7 +15,14 @@ end
|
|||||||
local capabilities = lspconfig_config.get_capabilities()
|
local capabilities = lspconfig_config.get_capabilities()
|
||||||
|
|
||||||
lsp_instller.on_server_ready(function(server)
|
lsp_instller.on_server_ready(function(server)
|
||||||
|
|
||||||
|
-- print(server.name)
|
||||||
|
-- print(vim.inspect(lspconfig_config.get_server_settings(server.name)))
|
||||||
|
|
||||||
server:setup{
|
server:setup{
|
||||||
|
root_dir = function()
|
||||||
|
return vim.fn.getcwd()
|
||||||
|
end,
|
||||||
init_options = lspconfig_config.get_server_init_options(server.name),
|
init_options = lspconfig_config.get_server_init_options(server.name),
|
||||||
on_attach = lspconfig_config.on_attach,
|
on_attach = lspconfig_config.on_attach,
|
||||||
on_init = lspconfig_config.on_init,
|
on_init = lspconfig_config.on_init,
|
||||||
|
Loading…
Reference in New Issue
Block a user