heybourn / headwind

An opinionated Tailwind CSS class sorter built for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=heybourn.headwind
MIT License
1.38k stars 46 forks source link

Support `classnames` package #58

Closed alexluong closed 3 years ago

alexluong commented 4 years ago

Is your feature request related to a problem? Please describe.

When working with Tailwind and React, I usually reach out for classnames. It seems like there's is no way headwind can support it.

Describe the solution you'd like

A workaround is a command that will sort whatever is in "selection", so that I can highlight a big string and have it sorted.

arturocr commented 3 years ago

I think it's a thing of adding a new capturing group to the existing regular expressions, sadly I'm not that good at writing RegEx. Hopefully, someone would be able to add one. BTW, clsx is a nicer alternative to classnames, so it would be awesome to include support for it as well. 🙂

msreekm commented 3 years ago

did anyone figure out how to sort classnames within "classname" pkg?