add sumneko_lua lspconfig

This commit is contained in:
siduck76 2021-04-18 11:27:06 +05:30
parent f71984e7f9
commit 92591015e5

View File

@ -49,3 +49,27 @@ for k, lang in pairs(servers) do
end end
} }
end end
-- lua lsp settings
USER = "/home/" .. vim.fn.expand("$USER")
local sumneko_root_path = USER .. "/.config/lua-language-server"
local sumneko_binary = USER .. "/.config/lua-language-server/bin/Linux/lua-language-server"
require "lspconfig".sumneko_lua.setup {
cmd = {sumneko_binary, "-E", sumneko_root_path .. "/main.lua"},
settings = {
Lua = {
runtime = {
version = "LuaJIT",
path = vim.split(package.path, ";")
},
diagnostics = {
globals = {"vim"}
},
workspace = {
library = {[vim.fn.expand("$VIMRUNTIME/lua")] = true, [vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true}
}
}
},
}