aboutsummaryrefslogtreecommitdiff
path: root/lua/config
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2022-08-13 23:08:25 +0800
committerjdhao <jdhao@hotmail.com>2022-08-13 23:08:25 +0800
commitecde08941b72cc0dc12c30073e5fce690efc5005 (patch)
treee584670884479a3f3736ad3ff2f9396f30950b49 /lua/config
parentab88c112ffc6270e7b37e33cbc5181fa5c63f94d (diff)
update lua-language-server conf
lua-language-server has changed its running method significantly, so we need to change it in the nvim-lspconfig.
Diffstat (limited to 'lua/config')
-rw-r--r--lua/config/lsp.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua
index 6273231..16f4a30 100644
--- a/lua/config/lsp.lua
+++ b/lua/config/lsp.lua
@@ -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 = {