-
-
Notifications
You must be signed in to change notification settings - Fork 447
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 is not formatting selection but the whole document in vscode #3145
Comments
This issue has been labeled as stale due to inactivity. Reply to keep this issue open. |
I have noticed it happens mostly in JSX files. In JS files it works but I must select a complete section, but that's probably a different issue. |
Yeah I get this issue a lot with the jsx files. It will only format the whole document even after selecting the "Format Selection" |
The same problem when formatting Python files. I'm wondering if this gets ever fixed. This dates back to year 2017 (#134)? Edit: This has just got hopefully fixed in microsoft/vscode-black-formatter#374 and will be released soon. Until then, one just gets some by-default invisible (!) warning in the OUTPUT console:
|
Summary
Prettier is formatting the whole document when executing format selection, at least in linux.
Github Repository to Reproduce Issue
Link to a Github repo that can be used to reproduce the issue.
Steps To Reproduce:
Expected result
Only the selected part should be formatted
Actual result
It formatts everything in the document.
Additional information
Record_select-area_20230914080434.mp4
VS Code Version:
Version: 1.82.1
Commit: 6509174151d557a81c9d0b5f8a5a1e9274db5585
Date: 2023-09-08T08:41:36.199Z
Electron: 25.8.0
ElectronBuildId: 23503258
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 5.18.17-amd64-desktop-hwe
Prettier Extension Version:
v10.1.0
OS and version:
Linux Deepin 20.9 (based on Debian 10)
Prettier Log Output
The text was updated successfully, but these errors were encountered: