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

Add inlay hints to v-bind shorthand #3702

Closed
so1ve opened this issue Nov 2, 2023 · 5 comments
Closed

Add inlay hints to v-bind shorthand #3702

so1ve opened this issue Nov 2, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@so1ve
Copy link
Member

so1ve commented Nov 2, 2023

vuejs/core#9451

@so1ve so1ve added the enhancement New feature or request label Nov 2, 2023
@rchl
Copy link
Collaborator

rchl commented Nov 2, 2023

You mean to add ="id" to :id so that it becomes :id="id"?

@so1ve
Copy link
Member Author

so1ve commented Nov 2, 2023

Yes 👍

@rchl
Copy link
Collaborator

rchl commented Nov 2, 2023

Why do you think this would be useful to have?
I would potentially use the shorthand form to make the code look cleaner and would understand how it works after seeing it a couple of times. I feel like showing inlay hint here would just add noise to the code and make it less clean without providing any value.

Inlay hints can provide additional value when they show you something that is not seen otherwise like the argument names but in this case I'm not sure the value is there. Unless the point is to teach newcomers but then they would learn after seeing it a few times and wouldn't need to always see it, I would think.

@so1ve
Copy link
Member Author

so1ve commented Nov 2, 2023

There are already some inlay hint functions, such as vue.inlayHints.inlineHandlerLeading, but they are not enabled by default. This feature can also be turned off by default, just to align with vue.inlayHints.inlineHandlerLeading.

@so1ve
Copy link
Member Author

so1ve commented Dec 29, 2023

#3830

@so1ve so1ve closed this as completed Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants