-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
PrettierAsync moves cursor to top of buffer #229
Comments
Hi There, In order for me to more reliably attempt to replicate this issue and submit a fix for it, could you please provide the output of your
Thanks a lot! |
I'm using Neovim 0.4.3. I just tried it out in Vim 8.1 and the same bug doesn't appear so this seems to be a Neovim-specific issue |
I'm facing the same issue:
I'm on the latest version of this plugin. |
This seems to be nvim 0.4.x issue with |
Sorry with the crazyness of moving countries and starting new job I did not had time to look into this before. will look into this today and submit a fix for it hopefully soon |
Working on this now. will comment in this issue with any findings and will try to submit a fix for it in the next few hours |
Was able to reproduce this issue on neovim 0.4.3 |
Just opened a PR fixing this issue #231 |
Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
Running PrettierAsync moves cursor to the top of the buffer when prettier ends up changing the amount of lines in the document (e.g by removing a newline in an empty object). The synchronous Prettier command doesn't do this.
e.g
:PrettierAsync
Content will (as expected) change to
but the cursor will be moved to the top of the buffer
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
) ?~/Documents/project/node_modules/.bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ?
Yes, this issue appeared when upgrading vim-prettier, in the same project with the same version of prettier.
The text was updated successfully, but these errors were encountered: