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-11-23 16:55:23 +00:00
|
|
|
T.add_highlighter_autoinstalls(
|
|
|
|
'html',
|
|
|
|
'css',
|
|
|
|
'scss',
|
|
|
|
'javascript',
|
|
|
|
'typescript'
|
|
|
|
)
|
2024-09-07 18:39:22 +00:00
|
|
|
|
|
|
|
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-11-23 16:55:23 +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-11-23 16:55:23 +00:00
|
|
|
lspconfig.ts_ls.setup(config)
|
2024-09-07 18:39:22 +00:00
|
|
|
lspconfig.eslint.setup(config)
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
|
|
|
|
return M
|