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
Add paste as default settings and enable js/ts paste with imports by default
Fixesmicrosoft#184871
For microsoft#30066
Adds new settings that let you configure the default way to paste/drop.
Also enables js/ts paste with imports by default for 5.7+. However will not apply by default. Instead it will be shown as an option after pasting. You can then use the `editor.pasteAs.preferences` setting to make it apply automatically or use the `javascript.updateImportsOnPaste.enabled` settings to disable the feature entirely
Copy file name to clipboardexpand all lines: extensions/typescript-language-features/package.nls.json
+1-1
Original file line number
Diff line number
Diff line change
@@ -224,7 +224,7 @@
224
224
"configuration.tsserver.web.projectWideIntellisense.suppressSemanticErrors": "Suppresses semantic errors on web even when project wide IntelliSense is enabled. This is always on when project wide IntelliSense is not enabled or available. See `#typescript.tsserver.web.projectWideIntellisense.enabled#`",
225
225
"configuration.tsserver.web.typeAcquisition.enabled": "Enable/disable package acquisition on the web. This enables IntelliSense for imported packages. Requires `#typescript.tsserver.web.projectWideIntellisense.enabled#`. Currently not supported for Safari.",
226
226
"configuration.tsserver.nodePath": "Run TS Server on a custom Node installation. This can be a path to a Node executable, or 'node' if you want VS Code to detect a Node installation.",
227
-
"configuration.updateImportsOnPaste": "Automatically update imports when pasting code. Requires TypeScript 5.7+.",
227
+
"configuration.updateImportsOnPaste": "Enable updating imports when pasting code. Requires TypeScript 5.7+.\n\nBy default this shows a option to update imports after pasting. You can use the `#editor.pasteAs.preferences#` setting to update imports automatically when pasting: `\"editor.pasteAs.preferences\": [{ \"kind\": \"text.jsts.pasteWithImports\" }]`.",
228
228
"configuration.expandableHover": "Enable/disable expanding on hover.",
229
229
"walkthroughs.nodejsWelcome.title": "Get started with JavaScript and Node.js",
230
230
"walkthroughs.nodejsWelcome.description": "Make the most of Visual Studio Code's first-class JavaScript experience.",
registerEditorContribution(CopyPasteController.ID,CopyPasteController,EditorContributionInstantiation.Eager);// eager because it listens to events on the container dom node of the editor
description: nls.localize('preferredDescription',"Configures the preferred type of edit to use when pasting content.\n\nThis is an ordered list of edit kinds with optional mime types for the content being pasted. The first available edit of a preferred kind will be used."),
121
+
default: [],
122
+
items: {
123
+
type: 'object',
124
+
required: ['kind'],
125
+
properties: {
126
+
mimeType: {
127
+
type: 'string',
128
+
description: nls.localize('mimeType',"The optional mime type that this preference applies to. If not provided, the preference will be used for all mime types."),
129
+
},
130
+
kind: {
131
+
type: 'string',
132
+
description: nls.localize('kind',"The kind identifier of the paste edit."),
exportconstpasteWidgetVisibleCtx=newRawContextKey<boolean>('pasteWidgetVisible',false,localize('pasteWidgetVisible',"Whether the paste widget is showing"));
0 commit comments