Skip to content

RunOnSave causing an issue when using autosave. #14

Open
@donk3ylee

Description

@donk3ylee

I wrote this RFC on headwinds github page but after seeing the package is not well maintained I figured I would use your fork instead in the hope of getting this issue fixed. My apologies if some of the settings described here are not named the same but I'm sure you will get the idea:

RunOnSave feature is causing an issue when using vscode autosave. The issue is that while I'm typing my tailwind classes, vscode autosaves triggering headwind to reorder. As this reorder applies the cursor does not follow the original classname and I end up writing half of my classname in the center of another, corrupting that classname and leaving the classname I'm trying to declare half written and lost somewhere else in the string.

Could you add another cofiguration setting say headwind.triggerPoint where the user can choose options "runOnSave" or "runOnLineOut". The runOnLineOut would be an option whereby the reordering would happen when the user focuses away from the line or maybe when the cursor focuses away from the class value declaration string (anything within the ""). Or just move the cursor with the reordering of possible, you get the idea.

It's a very handy extension for code readability and therefore productivity. It just becomes unusable when users have vscode autosave enabled and it gets triggered every 5 seconds, corrupting their tailwind classnames.

Thanks,
Donk3yLee.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions