-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Format on save for a notebook #120432
Comments
(Experimental duplicate detection) |
I'm wondering if it's something we can benefit from the file/workingCopy service. |
If that makes it easier, |
I'd also love format on save for notebooks. As mentioned above, I can use |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@NickCrews There is Sadly even that doesn't work atm since VS Code does not yet expose lifecycle events for notebooks. The issues to upvote for that are
If both get implemented, you should be able to add this to your settings to auto-format Jupyter notebooks: "emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.ipynb$",
"cmd": "black ${file}"
}
]
} |
same/related to #130799 |
This can now be turned on by setting |
Formatting with 'Format Cell' and 'Format Notebook' works but saving a notebook does not apply the formatters to each cell like a normal file would.
Example notebook cell that would be formatted if it was python:
The text was updated successfully, but these errors were encountered: