Skip to content

Commit

Permalink
fix(language-service): set code action kinds to avoid warning (#5096)
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX authored Dec 31, 2024
1 parent 3d76d11 commit 7eafbb2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/language-service/lib/plugins/vue-extract-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ export function create(
name: 'vue-extract-file',
capabilities: {
codeActionProvider: {
codeActionKinds: ['refactor'],
resolveProvider: true,
},
},
create(context) {
const tsPluginClient = getTsPluginClient?.(context);
return {
provideCodeActions(document, range, _context) {
provideCodeActions(document, range, ctx) {

if (ctx.only && !ctx.only.includes('refactor')) {
return;
}

const startOffset = document.offsetAt(range.start);
const endOffset = document.offsetAt(range.end);
Expand Down

0 comments on commit 7eafbb2

Please sign in to comment.