Skip to content

Instantly share code, notes, and snippets.

@mhartington
Created December 4, 2020 15:59
Show Gist options
  • Save mhartington/4428764d2bea38d09e0c0c1093d371b0 to your computer and use it in GitHub Desktop.
Save mhartington/4428764d2bea38d09e0c0c1093d371b0 to your computer and use it in GitHub Desktop.
lspconfig.sumneko_lua.setup {
cmd = {
string.format(
"%s/nvim/nvim_lsp/sumneko_lua/lua-language-server/bin/macOS/lua-language-server",
"-E",
"%s/nvim/nvim_lsp/sumneko_lua/lua-language-server/main.lua",
cache_dir,
cache_dir
)
},
capabilities = capabilities,
install_dir = string.format("%s/nvim/nvim_lsp/sumneko_lua", cache_dir),
is_installed = true,
on_attach = on_attach,
settings = {
Lua = {
diagnostics = {
enable = true,
globals = {"vim"}
},
filetypes = {"lua"},
runtime = {
path = vim.split(package.path, ";"),
version = "LuaJIT"
}
},
workspace = {
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("~/Github/neovim-org/neovim/src/nvim/lua")] = true
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment