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 45 forks source link

headwind.prependCustomClasses not respected in "sort workspace" command #210

Open JacobCrofts opened 5 months ago

JacobCrofts commented 5 months ago

Describe the bug

With this setting: "headwind.prependCustomClasses": true, the VSCode command Sort Tailwind CSS Classes on Entire Workspace does not respect the "prepend" setting. Instead, custom classes are sorted to the end of the CSS class list.

To Reproduce

Add this setting:

"headwind.prependCustomClasses": true

In any project with custom classes, open an HBS file with a mix of CSS classes, both custom and non-custom, and run the Sort Tailwind CSS Classes command. The CSS classes sort correctly, with the custom classes in the front.

Now run Sort Tailwind CSS Classes on Entire Workspace. The CSS classes are no longer sorted correctly.

Expected behavior

The results of the two commands should be the same, and the prependCustomClasses config option should be respected.

Desktop (please complete the following information):