Alex Styl
10/28/2025, 12:46 AMTim Schraepen
10/30/2025, 2:39 PMAlex Styl
10/30/2025, 3:52 PMclasses param of tags in kotlinx htmlAlex Styl
10/30/2025, 3:53 PMdiv(classes=" I want to have autocomplete on the tailwind classes for easier discoveryTim Schraepen
10/30/2025, 4:47 PMclasses is a String parameter.
Best I can come up with on the spot is something like a object TailWind { val size12 = "size-12" }, which could give you autocomplete after you type TailWind. and ctrl+space it.
But combining them into a space-separated list will be a PITA.
Then we'd have to start looking into something like an enum that has utility for combining:
enum class TailWind(val classVal: String) {
size12("size-12"),
textXl("text-xl")
;
operator fun plus(other: TailWind) = listOf(this, other)
companion object {
operator fun invoke(vararg classes: TailWind) = listOf(*classes).joinToString(" "){"$it.classVal"}
}
}Alex Styl
10/31/2025, 4:04 AMAlex Styl
10/31/2025, 4:20 AMAlex Styl
10/31/2025, 4:32 AMclasses param.
Full config in the next messageAlex Styl
10/31/2025, 4:33 AM{
"includeLanguages": {
"ftl": "html",
"jinja": "html",
"jinja2": "html",
"smarty": "html",
"tmpl": "gohtml",
"cshtml": "html",
"vbhtml": "html",
"razor": "html",
"kt": "html"
},
"files": {
"exclude": [
"**/.git/**",
"**/.hg/**",
"**/.svn/**",
"**/node_modules/**",
"**/.yarn/**",
"**/.venv/**",
"**/venv/**",
"**/.next/**",
"**/.parcel-cache/**",
"**/.svelte-kit/**",
"**/.turbo/**",
"**/__pycache__/**"
]
},
"emmetCompletions": true,
"classAttributes": [
"class",
"className",
"ngClass",
"classes"
],
"colorDecorators": true,
"showPixelEquivalents": true,
"rootFontSize": 16,
"hovers": true,
"suggestions": true,
"codeActions": true,
"validate": true,
"lint": {
"invalidScreen": "error",
"invalidVariant": "error",
"invalidTailwindDirective": "error",
"invalidApply": "error",
"invalidConfigPath": "error",
"cssConflict": "warning",
"recommendedVariantOrder": "warning"
},
"experimental": {
"configFile": null,
"classRegex": []
}
}Tim Schraepen
10/31/2025, 5:56 AMAlex Styl
10/31/2025, 6:11 AMskominas.ainis
11/01/2025, 7:59 PMCies Breijs
11/15/2025, 12:17 PMVáclav Benes
11/18/2025, 4:35 PM