-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathlua-ls.lua
More file actions
32 lines (31 loc) · 835 Bytes
/
lua-ls.lua
File metadata and controls
32 lines (31 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
local M = {}
local me = require("kide.melspconfig")
M.config = {
name = "lua_ls",
cmd = { "lua-language-server" },
filetypes = { "lua" },
root_dir = vim.fs.root(0, { ".stylua.toml", ".git" }) or vim.uv.cwd(),
on_attach = me.on_attach,
capabilities = me.capabilities(),
on_init = me.on_init,
settings = {
Lua = {
diagnostics = {
globals = { "vim" },
},
workspace = {
library = {
vim.fn.expand("$VIMRUNTIME/lua"),
vim.fn.expand("$VIMRUNTIME/lua/vim/lsp"),
vim.fs.joinpath(vim.fn.stdpath("data"), "lazy", "lazy.nvim", "lua", "lazy"),
"${3rd}/luv/library",
},
maxPreload = 100000,
preloadFileSize = 10000,
},
},
},
single_file_support = true,
log_level = vim.lsp.protocol.MessageType.Warning,
}
return M