Skip to content

TailwindSort on save #15

Answered by luckasRanarison
Gnarus-G asked this question in Q&A
Mar 25, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

The problem with sorting on save is that we don't know how the users handle BufWrite events, do they use format on save? If so is it asynchronous or not? And in the case where both are async we need a callback API on one side, the default format function from neovim doesn't provide a callback argument so I think it's resonable to a callback function on our side or add a sync version (I personally prefer async), but currently there's no way to do that if both are async.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Gnarus-G
Comment options

@luckasRanarison
Comment options

Answer selected by Gnarus-G
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants