mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Finalize paste api and drop api tweaks
Fixes #30066 This finalizes the documentPaste api. This api allows extensions to attach metadata on text copy and change how content is pasted. Some examples: - Updating imports for pasted code - Inserting an image as an attachment in notebooks - Pasting files converts them to relative text paths
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
"mappedEditsProvider",
|
||||
"codeActionAI",
|
||||
"codeActionRanges",
|
||||
"documentPaste",
|
||||
"editorHoverVerbosityLevel"
|
||||
],
|
||||
"capabilities": {
|
||||
|
||||
@@ -43,7 +43,7 @@ const enabledSettingId = 'updateImportsOnPaste.enabled';
|
||||
|
||||
class DocumentPasteProvider implements vscode.DocumentPasteEditProvider {
|
||||
|
||||
static readonly kind = vscode.DocumentDropOrPasteEditKind.Text.append('updateImports', 'jsts');
|
||||
static readonly kind = vscode.DocumentDropOrPasteEditKind.TextUpdateImports.append('jsts');
|
||||
static readonly metadataMimeType = 'application/vnd.code.jsts.metadata';
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user