Closed
Description
Describe the bug
When formatting a large JSON file, and the current indentWidth
is different from the target indentWidth
, formatting the file will be stuck for a long time, and can be seen in the deno
process CPU 100% utilization.
If config VSCode auto format when saving the file, it will block the SAVE
operation, even after clicking SKIP
it still doesn't work.
Note:
- No problem when formatting from stringify JSON files
- The problem only seems to occur when
indentWidth
is different - The
deno fmt 1.json
command is fine. This only happens with the Deno-VSCode-Extension. - There is no problem using VSCode's built-in formatting or Prettier extension
- I've reproduced the issue in at least 2 devices
To Reproduce
Please see attached demo project:
deno -W main.ts
generates1.json
.- Format the
1.json
(no problem) - Change the target
indentWidth
config - Format the
1.json
file again
Steps 3-4 can be modified and tested repeatedly.
Screenshots
deno-vscode-fmt-bug-demo.mp4
Versions
vscode: 1.99.3 deno: 2.3.1 extension: 3.44.1
Metadata
Metadata
Assignees
Labels
No labels