mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-27 21:09:31 +01:00
Final Support for Notebook CodeActionKind (#193121)
* finalize nb CodeActionKind * edit jsdoc + apiproposal change * stricter doc comment
This commit is contained in:
@@ -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',
|
||||
|
||||
Vendored
+18
@@ -2474,6 +2474,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.
|
||||
*
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/179213
|
||||
|
||||
export class NotebookCodeActionKind {
|
||||
// can only return MULTI CELL workspaceEdits
|
||||
// ex: notebook.organizeImprots
|
||||
static readonly Notebook: CodeActionKind;
|
||||
|
||||
constructor(value: string);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user