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

Test: Notebook CodeActions (Finalized API) #194077

Closed
2 tasks done
Yoyokrazy opened this issue Sep 26, 2023 · 0 comments
Closed
2 tasks done

Test: Notebook CodeActions (Finalized API) #194077

Yoyokrazy opened this issue Sep 26, 2023 · 0 comments

Comments

@Yoyokrazy
Copy link
Contributor

Yoyokrazy commented Sep 26, 2023

Refs: #193120, #179213

Complexity: 3

author: @Yoyokrazy

Create Issue


Summary:

The API has been finalized for support notebook CodeActions, now giving users the option to use the top-level kind CodeActionKind.Notebook when creating CodeAction providers. See more details in #193120.

Steps to Test:

  • Download or create your own extension, creating a provider for both cell/source and Notebook CodeActions
    • This is a sample extension that has two providers defined.
    • GHINB also has a Notebook CodeAction provider in this branch, as defined here.
  • Launch the extension host.
  • Create a new or open a pre-existing notebook
    • This is a playground I use with a couple messy notebooks that can be tested on.
  • Go to Settings (UI) and search for notebook.codeActionsOnSave and add your CodeActions.
    • If you use the sample extension, your settings.json could include something like this to test both Cell and Notebook scopes:
"notebook.codeActionsOnSave": {
	"notebook.source.cleanImports": "explicit", // this is a notebook CodeAction.
	"source.sampleCodeAction": "explicit", // this is a standard CodeAction, applied against all cells in parallel.
},
  • Save the document, triggering the CodeActions. May be easier to ensure they work individually by commenting one or the other CodeAction within your settings, then testing them combined at the end.

Thanks so much for testing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants