jscheid / prettier.el

Prettier code formatting for Emacs.
GNU General Public License v3.0
164 stars 11 forks source link

Skip cursor translation for Ruby parser #69

Closed jscheid closed 3 years ago

jscheid commented 3 years ago

The Ruby plugin's support for formatWithCursor is buggy but even if it wasn't crashing, it's apparently implemented as a no-op. We're better off just relying on the character-level diff to keep the cursor in place.

jscheid commented 3 years ago

Going to solve this with a different angle, as I've recently discovered that formatWithCursor is broken with built-in parsers: https://github.com/prettier/prettier/issues/4801