Skip to content
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

Add hook to run arbitrary commands on save of a notebook. #131989

Closed
grst opened this issue Feb 25, 2021 · 5 comments
Closed

Add hook to run arbitrary commands on save of a notebook. #131989

grst opened this issue Feb 25, 2021 · 5 comments
Assignees
Labels
*extension-candidate Issue identified as good extension implementation

Comments

@grst
Copy link

grst commented Feb 25, 2021

I propose to add an option that allows to execute an arbitrary command
on the notebook on every save. This would solve

and has probably even more use-cases.

@rchiodo
Copy link
Contributor

rchiodo commented Feb 26, 2021

Thanks for the suggestion. I believe this should already be possible (at least in insiders)?

See this here:
https://code.visualstudio.com/updates/v1_23#_run-code-actions-on-save

@grst
Copy link
Author

grst commented Feb 27, 2021

Thanks for the hint!

I'm not sure if I fully understood the concept of a codeAction, though. To use that feature, would I have to create a vscode extension that provides such a codeAction?

I thought of something simpler, that just pipes the entire file through a command line tool on each save.

@rchiodo
Copy link
Contributor

rchiodo commented Mar 1, 2021

Actually it seems the code actions are rather limited. I can't get anything to actually happen on save.

@rchiodo
Copy link
Contributor

rchiodo commented Aug 31, 2021

I believe this would have to be handled by VS code now as we don't get called for save anymore.

@rchiodo rchiodo changed the title Add hook to run arbitrary commands on save Add hook to run arbitrary commands on save of a notebook. Aug 31, 2021
@rchiodo rchiodo transferred this issue from microsoft/vscode-jupyter Aug 31, 2021
@mjbvz mjbvz added the *extension-candidate Issue identified as good extension implementation label Sep 2, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*extension-candidate Issue identified as good extension implementation
Projects
None yet
Development

No branches or pull requests

4 participants
@grst @mjbvz @rchiodo and others