1
0
Fork 1
Dotfiles_nvim/lua/toolchain/web.lua

32 lines
907 B
Lua
Raw Permalink Normal View History

2024-09-07 18:39:22 +00:00
local T = require('toolchain')
local M = {}
2024-09-07 23:50:39 +00:00
function M.setup()
2024-09-07 18:39:22 +00:00
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