cursive

dazld 2025-03-29T19:39:11.228429Z

I’ve been playing around with getting tailwind to play nicely with hiccup (and probably other frameworks/libraries) and have finally got a nice setup going, that seems to be doing the trick. I noticed a few others mentioning they’d like to see support - so sharing back what I’ve done. Add “clj” or “cljs” as html in the tailwind lsp settings as below Then add in the experimental “classRegex” the following magic:

"classRegex": ["\\:class\\s+\"([^\"]*)\""]
This will only match strings next to :class - it could probably be improved. A more brute force way is to match all non-whitespace strings - which you can do with:
"([^\\s]+)"
I’ve got both patterns running for now, and it’s working well. You get inline colours and autocomplete for available TW classes. Improvements to the regexes would be welcome if any wizards around feel like contributing 🙂

1
❤️ 3