nvimrc: Update lua_ls config
This commit is contained in:
parent
9f91f1e6de
commit
eedc2e1d1b
17
nvimrc
17
nvimrc
|
@ -844,24 +844,15 @@ nvim_lsp.diagnosticls.setup{
|
||||||
|
|
||||||
-- Lua
|
-- Lua
|
||||||
|
|
||||||
local system_name
|
local lua_ls_root_path = os.getenv("HOME").."/dev/lua-language-server"
|
||||||
if vim.fn.has("mac") == 1 then
|
local lua_ls_binary = lua_ls_root_path.."/bin/lua-language-server"
|
||||||
system_name = "macOS"
|
|
||||||
elseif vim.fn.has("unix") == 1 then
|
|
||||||
system_name = "Linux"
|
|
||||||
else
|
|
||||||
print("Unsupported system for sumneko")
|
|
||||||
end
|
|
||||||
|
|
||||||
local sumneko_root_path = os.getenv("HOME").."/dev/lua-language-server"
|
|
||||||
local sumneko_binary = sumneko_root_path.."/bin/"..system_name.."/lua-language-server"
|
|
||||||
|
|
||||||
local runtime_path = vim.split(package.path, ';')
|
local runtime_path = vim.split(package.path, ';')
|
||||||
table.insert(runtime_path, "lua/?.lua")
|
table.insert(runtime_path, "lua/?.lua")
|
||||||
table.insert(runtime_path, "lua/?/init.lua")
|
table.insert(runtime_path, "lua/?/init.lua")
|
||||||
|
|
||||||
nvim_lsp.sumneko_lua.setup {
|
nvim_lsp.lua_ls.setup {
|
||||||
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"};
|
cmd = {lua_ls_binary, "-E", lua_ls_root_path .. "/main.lua"};
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
|
|
Loading…
Reference in New Issue