formatOnSaveMode appears broken
See original GitHub issueIssue Type: Bug
I have the following settings:
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"editor.defaultFormatter": "ms-vscode.cpptools",
modifications
is set so that if there’s no background source control, no formatting is performed. However, as of VSCode 1.60.0 (I didn’t update vscode-clangd version) this option is formatting the entire file, which is what modificationsIfAvailable
is supposed to do.
After updating to the latest vscode-clangd this behaviour is still apparent.
modifications
still limits its formatting to edited sections of code when source control is enabled, so that bit is working fine.
Extension version: 0.1.13 VS Code version: Code 1.60.0 (e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff, 2021-09-01T10:41:52.311Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-6800K CPU @ 3.40GHz (12 x 3398) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 23.91GB (15.76GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
VS-Code Prettier Format On Save doesn't work - Stack Overflow
Follow these steps: CTRL + SHIFT + P; Format Document (in pop-up bar); Select Format Document; Select Configure Default Formatter.
Read more >VS Code tips — Format on save - YouTube
... worrying about checking in unformatted code Use the "editor. formatOnSaveMode " setting to control which lines in a file are formatted.
Read more >August 2020 (version 1.49) - Visual Studio Code
We added a new command Format Modified Lines, which allows you to only format new and changed lines. There is a new setting...
Read more >My Emacs Configuration - adventures in uncertainty
Setting it to 100mb seems to strike a nice balance between GC pauses ... NB: dap-go-setup appears to be broken, so you have...
Read more >rust-analyzer/rustfmt formatting behavior has changed ... - Reddit
There is a new setting editor.formatOnSaveMode, which makes Format on Save only apply to modified lines.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Filed upstream as https://github.com/microsoft/vscode/issues/132697.
Works on latest 1.61, thanks.