Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Prettier: failed to parse buffer" on write when autoformat_config_present is used #292

Open
foxbunny opened this issue Apr 3, 2021 · 4 comments

Comments

@foxbunny
Copy link

foxbunny commented Apr 3, 2021

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

This is a bug report.

What is the current/expected behavior?

I'm running into an issue where if I have

let g:prettier#autoformat_config_present = 1

in my .vimrc, vim-prettier will trigger on write, but fail with Prettier: failed to parse buffer.

If I simply issue the :Prettier command, it works as expected and formats the file.

The expected behavior is for formatting to be performed without errors on :w

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

1.0.0-beta

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

2.0.2

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

/node_modules/.bin/prettier

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

Not sure, first time using it.

@foxbunny
Copy link
Author

foxbunny commented Apr 3, 2021

After a bit of digging around, I find that :PrettierAsync is not working either throwing the same error.

@fabOnReact
Copy link

did you find a solution? thanks

@foxbunny
Copy link
Author

foxbunny commented Apr 4, 2021

did you find a solution? thanks

Sadly, no.

@fabOnReact
Copy link

I fixed this by using coc-prettier which is compatible with the ruby plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants