Dotfiles_nvim/lua/toolchain/web.lua

32 lines
901 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)
2024-09-10 07:41:43 +00:00
T.add_lsp_autoinstalls('html', 'emmet_ls', 'cssls', 'tailwindcss', 'eslint', 'ts_ls')
2024-09-07 18:39:22 +00:00
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)
2024-09-10 07:41:43 +00:00
lspconfig.ts_ls.setup(config)
2024-09-07 18:39:22 +00:00
lspconfig.eslint.setup(config)
end)
end
return M