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 hang on formatting a bigger file #326

Open
sahilrajput03 opened this issue Apr 8, 2022 · 0 comments
Open

prettier hang on formatting a bigger file #326

sahilrajput03 opened this issue Apr 8, 2022 · 0 comments

Comments

@sahilrajput03
Copy link

sahilrajput03 commented Apr 8, 2022

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

Bug

What is the current/expected behavior?

It takes more than 15-30 seconds to format a markdown file having lines more than 800+ lines and the problem is that my nvim hangs for all this time.

FYI: I tried to format the same file via command line i.e., prettier --write file.md it took only 2-3 seconds.

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.6.2

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

prettier

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

I don't know!

Try copying contents of below gist to a file say file.md and try formatting it to reproduce the behaviour.

THE CRITICAL THINGS is that I lost some data when i tried to abort the process few times and some of the file's data got deleted and i lost data! :(

https://gist.githubusercontent.com/sahilrajput03/42af1b0ae1da918768093e6684be36cb/raw/9e9e5817cd6080692a37ff90fd23076c604f3289/bug-prettier.md

Please help and debug!!

I am a huge fan of this extension.

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

1 participant