windicss / windicss-intellisense

Intelligent WindiCSS tooling for VS Code
https://marketplace.visualstudio.com/items?itemName=voorjaar.windicss-intellisense
MIT License
194 stars 16 forks source link

Sorting Should Respect Newlines #161

Closed han-tyumi closed 3 years ago

han-tyumi commented 3 years ago

I would like to enable Sort On Save but unfortunately there is a conflict when using Prettier. Prettier wants long class attributes names' to be on separate lines but Windi will sort them back onto one line. After saving it appears Windi's sorting is happening after Prettier leading to issues if you are also using ESLint with Prettier.

image image

So one solution, if possible, could be to run the sorter before Prettier or other formatters. However I think the better solution would be to respect the formatting when sorting class names.

IgnisDa commented 3 years ago

I would like to work on this. Will make a PR soon.

alexanderniebuhr commented 3 years ago

v0.20.0