Skip to content

Commit

Permalink
feat(language-service): filter internal props in completion
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 8, 2024
1 parent d0eec73 commit c24a7fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/language-service/lib/plugins/vue-template.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Disposable, LanguageServiceContext, LanguageServiceEnvironment, LanguageServicePluginInstance } from '@volar/language-service';
import { VueVirtualCode, hyphenateAttr, hyphenateTag, parseScriptSetupRanges, tsCodegen } from '@vue/language-core';
import { camelize, capitalize } from '@vue/shared';
import { camelize, capitalize, hyphenate } from '@vue/shared';
import { create as createHtmlService } from 'volar-service-html';
import { create as createPugService } from 'volar-service-pug';
import * as html from 'vscode-html-languageservice';
Expand Down Expand Up @@ -500,7 +500,10 @@ export function create(
const events = await tsPluginClient?.getComponentEvents(vueCode.fileName, tag) ?? [];
tagInfos.set(tag, {
attrs,
props,
props: props.filter(prop =>
!prop.startsWith('ref_')
&& !hyphenate(prop).startsWith('on-vnode-')
),
events,
});
version++;
Expand Down

0 comments on commit c24a7fd

Please sign in to comment.