You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue to document the final state of the Notebook CodeActionKind. Current proposition is as follows:
A new top level kind will be introduced as notebook.xyz, referenced as CodeActionKind.Notebook for extension authors and core usage
If a notebook CodeAction is called against a notebook, it will ONLY be called against the first cell of the notebook, and will precede the standard source CodeActions that will run against each cell in asynchronously. This is to ensure that all edits involving multiple cells will be addressed before any per cell action is taken. (ex: move all imports to top of notebook, normalize variable names, source.organizeImports, etc.)
Extension authors will be recommended via documentation in vscode.d.ts to use one of the following notations to create their kind:
Extension authors will be expected to register their provider with an adequate DocumentSelector, as well as CodeActionProviderMetadata that contains the field providedCodeActionKinds: readonly CodeActionKind[]
The following will be added to vscode.d.ts:
exportclassCodeActionKind{/** * 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) */staticreadonlyNotebook: CodeActionKind;constructor(value: string);}
thank you
The text was updated successfully, but these errors were encountered:
Fixes: #179213
Issue to document the final state of the
Notebook
CodeActionKind. Current proposition is as follows:notebook.xyz
, referenced asCodeActionKind.Notebook
for extension authors and core usagevscode.d.ts
to use one of the following notations to create their kind:CodeActionKind.Notebook.append(CodeActionKind.Source.append('normalizeVariableNames.ghinb').value)
CodeActionKind.Notebook.append('source.normalizeVariableNames')
CodeActionKind.Empty.append('notebook.source.normalizeVariableNames')
DocumentSelector
, as well asCodeActionProviderMetadata
that contains the fieldprovidedCodeActionKinds: readonly CodeActionKind[]
The following will be added to
vscode.d.ts
:thank you
The text was updated successfully, but these errors were encountered: