Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to have property hints in editor for globally registered components? #1369

Unanswered
iliubinskii asked this question in Q&A
Discussion options

The hints in Visual Studio Code look like this:
Screenshot
There is a list of properties and also description for each property.

When I register my components locally, I get the list, but I don't know how to add description.

However, if I register component globally:

app.component(name, Component);

I loose the list of properties.

On my screenshot I show quasar component that is registered globally and it has property hints.

How can I do the same for my components?

You must be logged in to vote

Replies: 1 comment

Comment options

It's possible.

1 - Configure User Snippets

For Global => New Global Snippets file

For Local Project => New Snippets file for 'project-name'

2- Set snippets file.

"Component Name": {
 "scope": "javascript,typescript",
 "prefix": "mycomp",
 "body": ["import MyComponent from './components/MyComponent.svelte';"],
 "description": "This is the description of my component"
 }

Screenshot 2022年05月05日 185903

3 - You can reach it by writing mycomp.

Screenshot 2022年05月05日 185259

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /