You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know, this has already been requested before (#108), and at the time it was judged better to implement locking formatting instead (#175), to prevent inadvertent buffer modification.
I do think however that there's still a use-case for synchronous formatting that isn't covered otherwise by the available options. When I save my file, my LSP is running diagnostics on everything. This can be a heavy process that takes a while. If the formatting happens after the writing, then the diagnostics won't correspond to the lines in my buffer, unless I save again (and start the whole checking process again, making the feedback loop even longer).
So, in order to have a proper BufWritePre hook that formats before anything is saved, synchronous formatting is the only solution I see.
I'll understand if you think this is out of scope for this plugin, but I thought I would offer another perspective for how this feature that almost got implemented (#109) could be useful.
The text was updated successfully, but these errors were encountered:
I know, this has already been requested before (#108), and at the time it was judged better to implement locking formatting instead (#175), to prevent inadvertent buffer modification.
I do think however that there's still a use-case for synchronous formatting that isn't covered otherwise by the available options. When I save my file, my LSP is running diagnostics on everything. This can be a heavy process that takes a while. If the formatting happens after the writing, then the diagnostics won't correspond to the lines in my buffer, unless I save again (and start the whole checking process again, making the feedback loop even longer).
So, in order to have a proper
BufWritePre
hook that formats before anything is saved, synchronous formatting is the only solution I see.I'll understand if you think this is out of scope for this plugin, but I thought I would offer another perspective for how this feature that almost got implemented (#109) could be useful.
The text was updated successfully, but these errors were encountered: