diff --git a/packages/language-service/lib/plugins/vue-extract-file.ts b/packages/language-service/lib/plugins/vue-extract-file.ts index e4d9aa62a8..fbd0c2fd62 100644 --- a/packages/language-service/lib/plugins/vue-extract-file.ts +++ b/packages/language-service/lib/plugins/vue-extract-file.ts @@ -28,7 +28,11 @@ export function create( create(context) { const tsPluginClient = getTsPluginClient?.(context); return { - provideCodeActions(document, range) { + provideCodeActions(document, range, ctx) { + + if (ctx.only && !ctx.only.includes('refactor')) { + return; + } const startOffset = document.offsetAt(range.start); const endOffset = document.offsetAt(range.end);