-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Test: notebook.format
Code Action
#213608
Comments
This is quite powerful and seems to work great. I am not a target audience so I just came up with an action provider that sorts cells by alphabet based on content. If you want more honest feedback I would really recommend to ping stakeholders in that referenced issue to try it out as well. For the future, if you want me to test more specific areas, please spell that out explicitly. I would not ask testers to go read through an issue to find things to test, that will very likely result in testers doing less compared to spelling it out explicitly in the test plan. |
Also if there are people on the Python/Jupyter team that are actually use the API, this is a good excuse to both test and start implementing it which should result in great feedback. |
Refs: #212381
Complexity: 5
author: @Yoyokrazy
Create Issue
Summary:
Support for notebook scoped formatting via code actions is now supported with the Code Action Kind
notebook.format.xyz
. This is to enable formatters to provide richer edits that are able to leverage theNotebookEdit
type, allowing them to add, delete, and shift cells, in addition to all of the standard textual edits within a cell.The intended user story for this feature is as follows: The user will install an extension that provides a
notebook.format.xyz
code action. To the user, they shouldn't need to know anything about the implementation details, or about the fact that it will provide a code action, rather than document formatting edits. The inner workings of the format code action should be controlled via the extension settings. The user should be able to control the behavior of this feature from the settings menu by turning on or off format on save or setting a different default formatter.Steps to test:
This section is going to be flexible, allowing testers to either develop and test via their own extension, or by tweaking an extension sample I have already created here. You can trigger this formatting code action by enabling the setting
notebook.formatOnSave.enabled
. You can also define this innotebook.codeActionsOnSave
and although this is not the intended use, it would be good to do this to check for any notebook-breaking behaviors.Things to look out for:
notebook.format.xyz
code action, you should receive a warning, and be prompted to update thenotebook.defaultFormatter
setting. This will have you set the fully qualified extension id of the code action provider that will handle formattingThe text was updated successfully, but these errors were encountered: