add sumneko_lua lspconfig
This commit is contained in:
parent
f71984e7f9
commit
92591015e5
1 changed files with 24 additions and 0 deletions
|
@ -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 a new issue