vim-prettier icon indicating copy to clipboard operation
vim-prettier copied to clipboard

Running Prettier wipes out all existing marks

Open gabesoft opened this issue 5 years ago • 5 comments

Do you want to request a feature or report a bug? Report a bug

What is the current/expected behavior? After running Prettier all user created marks in the current buffer are deleted

What version of vim-prettier are you using - (output of :PrettierVersion) ? 1.0.0-alpha

What version of prettier are you using - (output of :PrettierCliVersion) ? 2.0.5

What is your prettier executable path - (output of :PrettierCliPath) ? Absolute path to the project's node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ? Haven't tested

So to reproduce:

  1. add a mark via ma
  2. run Prettier (ensure this resulted in some changes)
  3. trying to go to the mark via 'a does not work

gabesoft avatar Jul 05 '20 01:07 gabesoft

I experience the same but only in lines that are prettified. Unmodified lines will remain the marks.

buschco avatar Jul 22 '20 15:07 buschco

I'm also experiencing this. If Prettier encounters an error, it will:

If using :Prettier, replace the buffer with the error. Discarding the contents of the file you were working on.

If using :PrettierAsync, empty the buffer. Discarding the contents of the file you were working on.

This makes the extension completely unusable in its current state.

DanielPower avatar Sep 03 '20 02:09 DanielPower

Same problem

Artawower avatar Nov 01 '20 19:11 Artawower

Could you folks please do a plug update and check if this PR https://github.com/prettier/vim-prettier/pull/300 fixed this issue for you?

mitermayer avatar Jun 03 '21 02:06 mitermayer

It seems to work fine now! Very nice! Thank you so much 🙏 🎉

buschco avatar Jun 03 '21 09:06 buschco