Skip to content

Commit 801befd

Browse files
committed
fix: always use workaround for insert completion name in vue files
1 parent a0a09bc commit 801befd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/specialCommands.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export default () => {
243243
registerExtensionCommand('insertNameOfCompletion', async (_, { insertMode } = {}) => {
244244
const editor = vscode.window.activeTextEditor
245245
if (!editor) return
246-
if (!getExtensionSetting('experiments.enableInsertNameOfSuggestionFix')) {
246+
if (!getExtensionSetting('experiments.enableInsertNameOfSuggestionFix') && editor.document.languageId !== 'vue') {
247247
const result = await sendCommand<RequestResponseTypes['getLastResolvedCompletion']>('getLastResolvedCompletion')
248248
if (!result) return
249249
const position = editor.selection.active
@@ -288,4 +288,10 @@ export default () => {
288288
const { text } = response
289289
await vscode.env.clipboard.writeText(text)
290290
})
291+
292+
registerExtensionCommand('pasteCodeWithImports', async () => {
293+
const clipboard = await vscode.env.clipboard.readText()
294+
const lines = clipboard.split('\n')
295+
const lastImportLineIndex = lines.findIndex(line => line !== 'import')
296+
})
291297
}

0 commit comments

Comments
 (0)