Closed Xeevis closed 2 years ago
I'm no expert, but shouldn't executeCommand return Promise/Thenable which should be waited for? https://github.com/heybourn/headwind/blob/6ccdeae090eb636288f37f08b6702fd7d76c06e6/src/extension.ts#L120-L124 Something along these lines or something
context.subscriptions.push(
workspace.onWillSaveTextDocument((_e) => {
_e.waitUntil(Promise.resolve(commands.executeCommand('headwind.sortTailwindClasses')));
})
);
Describe the bug When working with Maizzle I've noticed more tailwind markup meant higher chance of watch crashing. It turns out it's caused by Headwind's Run on Save.
To Reproduce Steps to reproduce the behavior:
npm install -g @maizzle/cli
maizzle new
(hit enter on all prompts)cd maizzle && code ./ && maizzle serve
Expected behavior No watcher error, VS code should save file only once all edits by extensions are in place.
Screenshots
Desktop (please complete the following information):
Additional context Disabling Headwind or setting
"headwind.runOnSave": false
fixes the issue. (reload required)Issue also reported on Maizzle repo https://github.com/maizzle/framework/issues/428 where it got closed as Headwind issue.