1
0
Fork 1
Dotfiles_nvim/lua/toolchain/web.lua
2024-09-08 01:50:39 +02:00

31 lines
907 B
Lua

local T = require('toolchain')
local M = {}
function M.setup()
T.add_highlighter_autoinstalls('html', 'css', 'scss', 'javascript', 'typescript')
T.add_null_ls_module(function(null_ls)
return {
-- Diagnostics
null_ls.builtins.diagnostics.stylelint,
-- Formatter
null_ls.builtins.formatting.prettier.with({
command = 'prettierd',
}),
}
end)
T.add_lsp_autoinstalls('html', 'emmet_ls', 'cssls', 'tailwindcss', 'eslint', 'tsserver')
T.add_lsps(function(lspconfig, capabilities)
local config = { capabilities = capabilities }
lspconfig.html.setup(config)
lspconfig.emmet_ls.setup(config)
lspconfig.cssls.setup(config)
lspconfig.tailwindcss.setup(config)
lspconfig.tsserver.setup(config)
lspconfig.eslint.setup(config)
end)
end
return M