MunifTanjim / prettier.nvim

Prettier plugin for Neovim's built-in LSP client.
MIT License
289 stars 9 forks source link

Format before save #11

Closed ryanw closed 2 years ago

ryanw commented 2 years ago

Is it possible to format the code before save? The readme says to use autocmd BufWritePost but this runs after save meaning it doesn't actually save the formatting unless you save twice. I tried using BufWritePre and BufWriteCmd but both didn't format until after saving either.

ryanw commented 2 years ago

It should be calling formatting_seq_sync.