Description
Would be really nice to add a command that allows bypassing automatic formatting while saving a file, if the user has it enabled.
Specifically, saving using this command would skip the changes caused by enabling either:
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.formatOnSave": true,
(Not sure if there are more transformations that can be triggered on save)
It probably doesn't need to be bound to any specific keyboard shortcut by default.
Reasoning: Very often I find myself having to patch a third-party package, by either cloning their repo and submitting a PR, or by directly editing the package inside node_modules
(Using the patch-package
tool), and it will usually produce a large/ugly diff because of the several changes caused by automatic formatting. I can surely disable the setting temporarily (or add a .vscode
folder inside node_modules
disabling the options), but neither is an ideal solution.
Thanks in advance!
Activity