You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In VSCode settings, editor.formatOnSave setting has the following description:
Format a file on save. A formatter must be available, the file must not be saved after delay, and the editor must not be shutting down.
"the file must not be saved after delay" part made me assume that the format on save feature will never work when files.autoSave is set to afterDelay.
But that's not true because the formatting is still applied when the file is saved explicitly.
I understand that what you're trying to communicate is that the formatting won't be applied automatically, when the file is saved automatically. But it can still be applied manually when the file is explicitly saved.
The same is true for the descriptions of notebook.formatOnSave and notebook.codeActionsOnSave settings. editor.codeActionsOnSave is an outlier since it doesn't contain that part in the description, but the same is true for this option as well, so it can be updated for consistency.
Attaching related screencasts, to demonstrate.
editor.formatOnSave with auto save set to "off":
auto-save-off-file-format.mov
editor.formatOnSave with auto save set to "afterDelay":
auto-save-on-file-format.mov
Does this issue occur when all extensions are disabled?
Attaching additional screencasts for the rest of the cases.
editor.codeActionsOnSave - auto save set to "off" (unused import deleted after manual save)auto-save-off-file-code-actions.moveditor.codeActionsOnSave - auto save set to "afterDelay" (unused import deleted after manual save)auto-save-on-file-code-actions.movnotebook.formatOnSave - auto save set to "off"auto-save-off-py-notebook-format.movnotebook.formatOnSave - auto save set to "afterDelay"auto-save-on-py-notebook-format.movnotebook.codeActionsOnSave - auto save set to "off" (unused import deleted after manual save)auto-save-off-py-notebook-code-actions.movnotebook.codeActionsOnSave - auto save set to "afterDelay" (unused import deleted after manual save)auto-save-on-py-notebook-code-actions.mov
elias-pap
changed the title
Confusing settings descriptions about actions on auto save
Confusing settings descriptions about actions and auto save
Sep 28, 2024
The problem
In VSCode settings,
editor.formatOnSave
setting has the following description:"the file must not be saved after delay" part made me assume that the format on save feature will never work when
files.autoSave
is set toafterDelay
.But that's not true because the formatting is still applied when the file is saved explicitly.
I understand that what you're trying to communicate is that the formatting won't be applied automatically, when the file is saved automatically. But it can still be applied manually when the file is explicitly saved.
The same is true for the descriptions of
notebook.formatOnSave
andnotebook.codeActionsOnSave
settings.editor.codeActionsOnSave
is an outlier since it doesn't contain that part in the description, but the same is true for this option as well, so it can be updated for consistency.Attaching related screencasts, to demonstrate.
editor.formatOnSave
with auto save set to "off":auto-save-off-file-format.mov
editor.formatOnSave
with auto save set to "afterDelay":auto-save-on-file-format.mov
Does this issue occur when all extensions are disabled?
Yes
System info
1.93.1 (Universal)
Darwin arm64 23.6.0
Steps to Reproduce:
You can try to reproduce what is depicted in the second video above.
editor.defaultFormatter
setting tovscode.typescript-language-features
.editor.formatOnSave
setting.files.autoSave
toafterDelay
.The file is not auto-formatted after step 5 even though the file is auto saved, but it is after step 6 (the whitespace added in step 5 is gone).
The text was updated successfully, but these errors were encountered: