prettier / prettier-vscode

Visual Studio Code extension for Prettier
https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
MIT License
5.03k stars 447 forks source link

Editor scrolls to bottom when format large file using prettier #3360

Open clive-p opened 1 month ago

clive-p commented 1 month ago

In vscode running the editor.action.formatDocument command in a javascript file makes the editor scroll to the last line of the file which is really annoying. It happens for large files that are 6000+ lines. It tends to happen when the content of the line the cursor is on changes due to being formatted.

I've disabled all extensions apart from prettier and it's still happening. I also set up a new vscode codespace and installed prettier and no other extensions and it happens in there. This proves it is a generic issue with prettier and is not specific to my configuration.

JoCat commented 2 weeks ago

I ran into the same problem today, I had a file of almost 3k lines