1
0
Fork 1
Dotfiles_nvim/lua/toolchain/web.lua
2024-11-23 17:55:23 +01:00

44 lines
1,001 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',
'ts_ls'
)
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.ts_ls.setup(config)
lspconfig.eslint.setup(config)
end)
end
return M