nvim: fix error relating to lua lsp loading
This commit is contained in:
parent
8715300a8f
commit
ffc613da83
1 changed files with 34 additions and 32 deletions
|
@ -212,7 +212,7 @@ M.lspconfig = function()
|
|||
bashls = 'bash-language-server',
|
||||
}
|
||||
for lsp, exe in pairs(lsp_servers) do
|
||||
if (vim.fn.executable(exe) == 1) then
|
||||
if (vim.fn.executable(exe) == true) then
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
|
@ -223,7 +223,6 @@ M.lspconfig = function()
|
|||
end
|
||||
-- Custom servers >>>
|
||||
-- lua >>>
|
||||
-- From kickstart.nvim:
|
||||
local sumneko_root_path
|
||||
local sumneko_binary
|
||||
if (vim.fn.exepath('lua-language-server') ~= '') then
|
||||
|
@ -236,6 +235,8 @@ M.lspconfig = function()
|
|||
sumneko_binary = sumneko_root_path .. '/lua-language-server'
|
||||
end
|
||||
|
||||
-- From kickstart.nvim:
|
||||
if (vim.fn.executable(sumneko_binary) == true) then
|
||||
-- Make runtime files discoverable to the server
|
||||
local runtime_path = vim.split(package.path, ';')
|
||||
table.insert(runtime_path, 'lua/?.lua')
|
||||
|
@ -268,6 +269,7 @@ M.lspconfig = function()
|
|||
},
|
||||
},
|
||||
}
|
||||
end
|
||||
-- lua <<<
|
||||
-- Custom servers <<<
|
||||
-- Load servers <<<
|
||||
|
|
Loading…
Add table
Reference in a new issue