add sumneko_lua lspconfig
This commit is contained in:
parent
f71984e7f9
commit
92591015e5
|
@ -49,3 +49,27 @@ for k, lang in pairs(servers) do
|
|||
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}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue