Open michaelschufi opened 3 years ago
you can use webstorm instead vscode. :))
This issue is even more visible with the new version 2. Then you have component names that does not match file names.
We already have basic vetur support (https://github.com/vuejs/vetur/pull/1921) but it requires a full restart in case of any changes. Any contribution to this are more than welcome.
It is also possible to investigate list of auto-generated components from 'components/readme.md`:
md preview in vscode:
BTW we are aware of this inconvenience. Planning to work on a robust UI solution to browse discovered components :)
Please excuse my ignorance, but is there a way to describe the tags and attributes discovered by the auto-importer, for hover information in the editor?
if there is an easy way to notify vetur extension .nuxt/vetur/tags.json
is updated I think so yes :) /cc @octref if you have any hint for doing this.
I've added this code to the vetur.config.js
file
const fs = require('fs');
const components = JSON.parse(fs.readFileSync('./resources/nuxt/.nuxt/vetur/tags.json', 'utf8'));
const globalComponents = Object.keys(components)
.filter((name) => !!components[name])
.map((name) => {
return {
name,
path: './resources/nuxt/' + components[name].description.substring(19),
};
});
To work around the issue. I am trying to find a way to auto-reload the VLS server on a file watcher change and have been unsuccessful.
I enjoy not having to import all the component files. Though, it seems to me, that a lot of the Intellisense stops working if I do not explicitly import a component in the script tag.
Is there any generic solution for this to be able to use the auto-importer but still have props autocompletion and peeking?