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

Final Support for Notebook CodeActionKind #193121

Merged
merged 3 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export const allApiProposals = Object.freeze({
languageConfigurationAutoClosingPairs: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageConfigurationAutoClosingPairs.d.ts',
mappedEditsProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.mappedEditsProvider.d.ts',
notebookCellExecutionState: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCellExecutionState.d.ts',
notebookCodeActions: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookCodeActions.d.ts',
notebookControllerAffinityHidden: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts',
notebookDeprecated: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts',
notebookExecution: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookExecution.d.ts',
Expand Down
18 changes: 18 additions & 0 deletions src/vscode-dts/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2465,6 +2465,24 @@ declare module 'vscode' {
*/
static readonly SourceFixAll: CodeActionKind;

/**
* Base kind for all code actions applying to the enitre notebook's scope. CodeActionKinds using
* this should always begin with `notebook.`
*
* This requires that new CodeActions be created for it and contributed via extensions.
* Pre-existing kinds can not just have the new `notebook.` prefix added to them, as the functionality
* is unique to the full-notebook scope.
*
* Notebook CodeActionKinds can be initialized as either of the following (both resulting in `notebook.source.xyz`):
* - `const newKind = CodeActionKind.Notebook.append(CodeActionKind.Source.append('xyz').value)`
* - `const newKind = CodeActionKind.Notebook.append('source.xyz')`
*
* Example Kinds/Actions:
* - `notebook.source.organizeImports` (might move all imports to a new top cell)
* - `notebook.source.normalizeVariableNames` (might rename all variables to a standardized casing format)
*/
static readonly Notebook: CodeActionKind;

/**
* Private constructor, use statix `CodeActionKind.XYZ` to derive from an existing code action kind.
*
Expand Down
17 changes: 0 additions & 17 deletions src/vscode-dts/vscode.proposed.notebookCodeActions.d.ts

This file was deleted.