Skip to content

Commit

Permalink
feat(language-service): sort props completion
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 8, 2024
1 parent c24a7fd commit 3aa25ee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/language-service/lib/plugins/vue-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,17 @@ export function create(
const [componentName] = itemId.args;

if (componentName !== '*') {
item.sortText = '\u0000' + (item.sortText ?? item.label);
if (
item.label === 'class'
|| item.label === 'ref'
|| item.label.endsWith(':class')
|| item.label.endsWith(':ref')
) {
item.sortText = '\u0000' + (item.sortText ?? item.label);
}
else {
item.sortText = '\u0000\u0000' + (item.sortText ?? item.label);
}
}

if (itemId.type === 'componentProp') {
Expand Down

0 comments on commit 3aa25ee

Please sign in to comment.