31 lines
726 B
Lua
31 lines
726 B
Lua
local T = require('toolchain')
|
|
local M = {}
|
|
|
|
function M.setup()
|
|
T.add_highlighter_autoinstalls('lua','luadoc')
|
|
|
|
T.add_null_ls_module(function(null_ls)
|
|
return {
|
|
-- Diagnostics
|
|
null_ls.builtins.diagnostics.selene,
|
|
-- Formatter
|
|
null_ls.builtins.formatting.stylua,
|
|
}
|
|
end)
|
|
T.add_lsp_autoinstalls('lua_ls')
|
|
|
|
T.add_lsps(function(lspconfig, capabilities)
|
|
lspconfig.lua_ls.setup({
|
|
capabilities = capabilities,
|
|
settings = {
|
|
Lua = {
|
|
diagnostics = {
|
|
globals = { 'vim' },
|
|
},
|
|
},
|
|
},
|
|
})
|
|
end)
|
|
end
|
|
|
|
return M
|