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

autoformat option breaks manual version (also just doesn't work)

Open rivertam opened this issue 5 years ago • 1 comments

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

Bug

What is the current/expected behavior?

When let g:prettier#autoformat = 1, vim-prettier basically just stops working entirely.

Please see asciinema for a quick reproduction: https://asciinema.org/a/AtIIMALtLnQpRVp6suKjayUab

Sorry about the large size. If you have a low-res monitor, I recommend you hit Ctrl-- a couple of times to fit everything in view at once.

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) ?

1.19.1

What is your prettier executable path - (output of :PrettierCliPath) ?

it just says prettier

(which prettier => $HOME/.config/yarn/global/node_modules/.bin/prettier)

Did this work in previous versions of vim-prettier and/or prettier ?

Yep

rivertam avatar May 05 '20 20:05 rivertam

let g:prettier#autoformat_require_pragma = 0 fixed it for me, I think it expects a

/**
 * @format
 */

comment on top of your file or disabling require pragma in your .prettierrc

lazopm avatar May 13 '20 06:05 lazopm