-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
notebook.
code action provider is called repeatedly for all cells
#184028
Comments
I'm planning on talking with Matt about this, I think this issue lies in the providers being called for every cell as each cell editor polls for CodeActions (prompted via the lightbulb, not sure the exact terminology here). I'd like to figure out a way to filter |
That makes most sense to me. If I specifically target a notebook (via kind and/or selector) I want only be called for that notebook. |
I'm wondering if there would be a good way to surface actions to the user for the notebook context. Showing them a lightbulb in the cells doesn't seem perfect, even if you only ever get a bulb in the currently focused cell. If the end state of notebook CodeActions is to align with the standard editor experience, I don't think it should be fully restricted to save. Especially with format on run enabled, there's like plenty of users never explicitly saving their notebooks. Maybe a contribution to the toolbar? Might be made easier by the redesign of notebook toolbars potentially coming in the next iteration. |
Just tried this again with It registers itself via the 'notebook.source.normalizeVariableNames'-kind and to my understanding it should only every be called with the first cell and only when source actions are requested, like on save |
re #183855
notebook.source.normalizeVariableNames
My understanding is that such a provider (kind=
notebook...
) is only ever called with the first cell and is always allowed to return a cross-cell edit (workspace edit)Code sample with updated logging: https://github.com/microsoft/vscode-github-issue-notebooks/blob/5382aecd929e842309c6cd101bb76c9d125e3b24/src/extension/languageProvider.ts#L566
Logging (right after startup, no save invoked yet)
The text was updated successfully, but these errors were encountered: