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
M-x prettier-prettify-region to prettify region (but note that region should align with a complete block of code).
This is somewhat misleading, we should update the docs to read "a complete top-level block of code".
That's because we're sending only the selected block to Prettier and so it thinks it's formatting a top-level construct, which yours isn't.
Admittedly that's not very useful. Perhaps it would be better to send the whole buffer up to the end of the region, have Prettier format that, then throw away any changes outside the region. I might implement that in the successor to this project which I'm working on, on and off.
I get errors when I simply try to prettify a highlighted region. Prettifying the enter buffer works without issue:
The text was updated successfully, but these errors were encountered: