Skip to content

Conversation

@runyasak
Copy link
Contributor

Overview

I've added vapor completion support for Vue 3.6 in <script setup blocks>.

Screenshots

Screen.Recording.2568-07-20.at.21.57.23.mov

Discussions

  • Vue Vapor is currently in alpha (Vue 3.6.0-alpha.1), so I'm not entirely sure if we should add this feature right now or wait for a more stable release. What are your thoughts on this?
  • Should we add a setting to enable/disable this feature? Since Vue Vapor is an opt-in feature and still experimental, I'm wondering if we should have a configuration option to disable vapor completions for users who don't want to see them yet.

Something like:

{
  "vue.complete.vapor": true // default: true or false?
}

I'd appreciate your thoughts on:

  • Whether it's too early to add this feature given Vapor's alpha status
  • If we should include a configuration option to toggle vapor completions
  • What the default value should be if we do add the config

If you have any feedback or suggestions, please do not hesitate to let me know.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jul 20, 2025

Open in StackBlitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5541

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5541

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5541

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5541

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5541

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5541

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5541

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5541

commit: 3eaf7f1

@KazariEX
Copy link
Member

We can just write vapor instead of setup vapor, which is equivalent to writing setup vapor at compile time.

Since the data is automatically crawled from official document, please do not modify it manually.

@runyasak
Copy link
Contributor Author

runyasak commented Jul 20, 2025

@KazariEX I'm sorry for updating the JSON data manually—I’ve already reverted those changes.

We can just write vapor instead of setup vapor, which is equivalent to writing setup vapor at compile time.

Thank you for clarifying that we can just write vapor instead of setup vapor, and that it’s equivalent at compile time. As I understand, the syntax should be <script vapor> instead.
Should I implement completion for this feature? If so, I’d appreciate any guidance on how you’d like it handled.

If you or someone else is already working on this, please let me know and I can close this PR if needed.

@KazariEX
Copy link
Member

According to the current data generation logic, we need to wait for the official document to add the script vapor entry before implementing this feature.

See https://github.com/vuejs/language-tools/blob/master/packages/language-service/scripts/update-html-data.js.

@runyasak
Copy link
Contributor Author

@KazariEX I understand you now. So, I will close this PR for now and wait until the feature is ready in the official documentation. If you want me to contribute or implement this feature in the future, please let me know or feel free to re-open this PR.

Thank you for discussing this with me. 😁

@runyasak runyasak closed this Jul 20, 2025
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.

2 participants