lsp/presets/tailwindcss-language-server: init

This commit is contained in:
Snoweuph 2026-04-11 16:21:04 +02:00
commit 0bffd83d43
No known key found for this signature in database
GPG key ID: BEFC41DA223CEC55
3 changed files with 151 additions and 85 deletions

View file

@ -20,91 +20,6 @@
tailwindcss = {
enable = true;
cmd = [(getExe pkgs.tailwindcss-language-server) "--stdio"];
filetypes = [
# html
"aspnetcorerazor"
"astro"
"astro-markdown"
"blade"
"clojure"
"django-html"
"htmldjango"
"edge"
"eelixir"
"elixir"
"ejs"
"erb"
"eruby"
"gohtml"
"gohtmltmpl"
"haml"
"handlebars"
"hbs"
"html"
"htmlangular"
"html-eex"
"heex"
"jade"
"leaf"
"liquid"
"markdown"
"mdx"
"mustache"
"njk"
"nunjucks"
"php"
"razor"
"slim"
"twig"
# css
"css"
"less"
"postcss"
"sass"
"scss"
"stylus"
"sugarss"
# js
"javascript"
"javascriptreact"
"reason"
"rescript"
"typescript"
"typescriptreact"
# mixed
"vue"
"svelte"
"templ"
];
settings = {
tailwindCSS = {
validate = true;
lint = {
cssConflict = "warning";
invalidApply = "error";
invalidScreen = "error";
invalidVariant = "error";
invalidConfigPath = "error";
invalidTailwindDirective = "error";
recommendedVariantOrder = "warning";
};
classAttributes = [
"class"
"className"
"class:list"
"classList"
"ngClass"
];
includeLanguages = {
eelixir = "html-eex";
elixir = "phoenix-heex";
eruby = "erb";
heex = "phoenix-heex";
htmlangular = "html";
templ = "html";
};
};
};
before_init = mkLuaInline ''
function(_, config)
if not config.settings then