Dotfiles_nvim/lua/toolchain/lua.lua

32 lines
727 B
Lua
Raw Normal View History

2024-09-07 20:39:22 +02:00
local T = require('toolchain')
local M = {}
2024-09-08 01:50:39 +02:00
function M.setup()
2025-01-13 15:30:01 +01:00
T.add_highlighter_autoinstalls('lua', 'luadoc')
2024-09-07 20:39:22 +02:00
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