Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-service): better sorting & filtering of completion #4671

Merged
merged 8 commits into from
Aug 25, 2024

Conversation

KazariEX
Copy link
Collaborator

@KazariEX KazariEX commented Aug 8, 2024

fix #4670

@johnsoncodehk johnsoncodehk changed the title fix(language-service): drop unnecessary completion of event refactor(language-service): drop unnecessary completion of event Aug 9, 2024
@johnsoncodehk johnsoncodehk changed the title refactor(language-service): drop unnecessary completion of event fix(language-service): drop unnecessary completion of event Aug 9, 2024
@johnsoncodehk
Copy link
Member

@KazariEX Could you add a minimal test case?

@KazariEX KazariEX marked this pull request as draft August 9, 2024 15:03
@KazariEX KazariEX changed the title fix(language-service): drop unnecessary completion of event fix(language-service): better sorting & filtering of completion Aug 9, 2024
@KazariEX KazariEX changed the title fix(language-service): better sorting & filtering of completion feat(language-service): better sorting & filtering of completion Aug 9, 2024
@KazariEX KazariEX marked this pull request as ready for review August 9, 2024 16:07
@KazariEX
Copy link
Collaborator Author

KazariEX commented Aug 9, 2024

I have revised this PR and now it will do the following in the completion:

  • Remove events in the formats of onX, :onX and v-bind:onX. IMO the standard practice for using component events should be to only use @ or v-on:
  • Consider class, is, key, ref and style as special props of all elements and components, and arrange them in the following order at the beginning of the completion list:
    1. props
    2. specialProps
    3. :props
    4. :specialProps
    5. @events
    6. v-bind:props
    7. v-bind:specialProps
    8. v-on:events
  • Restore the display of the vnode events and rank it at the end of the list with the lowest priority.

Copy link

pkg-pr-new bot commented Aug 25, 2024

commit: 37e534e

vue-component-meta

pnpm add https://pkg.pr.new/vuejs/language-tools/vue-component-meta@4671

vue-component-type-helpers

pnpm add https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@4671

@vue/language-core

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-core@4671

@vue/language-plugin-pug

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@4671

@vue/language-server

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-server@4671

@vue/language-service

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/language-service@4671

vue-tsc

pnpm add https://pkg.pr.new/vuejs/language-tools/vue-tsc@4671

@vue/typescript-plugin

pnpm add https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@4671

Open in Stackblitz

@johnsoncodehk
Copy link
Member

I'm a bit unsure of the best way to display for DX so show all items if possible, glad you have insights on this. 👍

@johnsoncodehk johnsoncodehk merged commit d6bd797 into vuejs:master Aug 25, 2024
5 checks passed
@KazariEX KazariEX deleted the fix/issue-4670 branch August 26, 2024 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unnecessary completion of event
2 participants