0

enter image description here

I'm using vscode prettier, and at some point when I save the code, the end line goes up to the top of the screen. If you scroll down, the first line isn't gone, it's still there, but the end line comes up on top of the screen.

When I deleted the prettier and saved the code, there was no line break, but when I installed it again, the second line came up to the top of the screen.

same symptoms occurred when I deleted and reinstalled all the settings and extensions of the Vscode and reinstalled only the prettier.

pilot97
  • 1
  • 1
  • Sounds like https://github.com/prettier/prettier-vscode/issues/409, which leads to https://github.com/amatiasq/vsc-sort-imports/issues/7. Do you have the `sort-imports` extension installed? – starball Feb 21 '23 at 19:17
  • First of all, thank you for leaving a comment. I didn't install sort-imports extension. The same symptoms occurred when I deleted and reinstalled all the settings and extensions of the Vscode and reinstalled only the prettier. – pilot97 Feb 22 '23 at 20:58
  • I'm not sure if that will really address the underlying problem at all. What happens if you have a larger file with more lines than you can see at max window size and you trigger formatting while your caret is at the top of the file? – starball Feb 22 '23 at 22:30
  • I'd suggest that you [file an issue ticket to `prettier-vscode`](https://github.com/prettier/prettier-vscode/issues) and explain the issue you encountered, how to reproduce it, how you solved it, and to ask why it happens and why the solution you found works. Link to [this issue](https://github.com/prettier/prettier-vscode/issues/409) in the one you create, and add a link here to the issue you create for posterity. – starball Feb 23 '23 at 20:48
  • 1
    thank you :) https://github.com/prettier/prettier-vscode/issues/2880 – pilot97 Feb 23 '23 at 21:24
  • you should write up an answer post with the solution you found (see [answer]). – starball Feb 23 '23 at 21:41
  • Oh, I thought I found the problem, but when I re-run the vscode, the prettier itself didn't work. I think it just happened to work. That's why I didn't write down the answer. – pilot97 Feb 23 '23 at 22:10

0 Answers0