-
Notifications
You must be signed in to change notification settings - Fork 4.8k
How to have property hints in editor for globally registered components? #1369
-
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?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
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"
}
3 - You can reach it by writing mycomp.
Beta Was this translation helpful? Give feedback.