Open chasegiunta opened 4 years ago
this is my huge main issue with this plugin. because my times like @chasegiunta are describing I'm trying different sizes of the same px/py or different colors and this behavior is breaking my flow. It's a huge problem :(
I don't know if vscode offers the API for it, but it would be already a huge improvement, that it reorders only when I hit CMD+S and not during autosave.
Edit: just looked it up: Should be possible using the saving reason from the event. https://code.visualstudio.com/api/references/vscode-api#TextDocumentWillSaveEvent
I like this extension, but the one thing that may end up making me stop using it is this very issue. The classes sort, but my cursor doesn't move with it. Sure, it only takes a few seconds to move the cursor, but over the course of a 5 hour work-period, this adds up really quick.
Is your feature request related to a problem? Please describe. A common workflow is inputting a class with a certain value and incrementing or decrementing: input
px-3
, review how it looks, hit backspace and change3
to4
, etc.Headwind will keep your cursor exactly where it is, regardless of what has changed, leading to mistaken backspaces and class editing.
Describe the solution you'd like The Prettier vscode handles this situation well. On reformat, your cursor will remain next to the nearest token it was alongside before format. It would be great if this can be implemented in Headwind.