mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update lua-language-server conf
lua-language-server has changed its running method significantly, so we need to change it in the nvim-lspconfig.
This commit is contained in:
parent
ab88c112ff
commit
ecde08941b
@ -148,17 +148,13 @@ if utils.executable('bash-language-server') then
|
||||
})
|
||||
end
|
||||
|
||||
local sumneko_binary_path = fn.exepath("lua-language-server")
|
||||
if vim.g.is_mac or vim.g.is_linux and sumneko_binary_path ~= "" then
|
||||
local sumneko_root_path = fn.fnamemodify(sumneko_binary_path, ":h:h:h")
|
||||
|
||||
if utils.executable("lua-language-server") then
|
||||
local runtime_path = vim.split(package.path, ";")
|
||||
table.insert(runtime_path, "lua/?.lua")
|
||||
table.insert(runtime_path, "lua/?/init.lua")
|
||||
|
||||
lspconfig.sumneko_lua.setup({
|
||||
on_attach = custom_attach,
|
||||
cmd = { sumneko_binary_path, "-E", sumneko_root_path .. "/main.lua" },
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user