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

vetur support #110

Open
michaelschufi opened this issue Nov 14, 2020 · 6 comments
Open

vetur support #110

michaelschufi opened this issue Nov 14, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@michaelschufi
Copy link

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?

@nvthuong1996
Copy link

nvthuong1996 commented Nov 23, 2020

you can use webstorm instead vscode. :))

@lttr
Copy link

lttr commented Feb 17, 2021

This issue is even more visible with the new version 2. Then you have component names that does not match file names.

@pi0
Copy link
Member

pi0 commented Apr 6, 2021

We already have basic vetur support (vuejs/vetur#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`:

image

md preview in vscode:

image

BTW we are aware of this inconvenience. Planning to work on a robust UI solution to browse discovered components :)

@pi0 pi0 changed the title How can I make Vetur's intellisense work with this feature? vetur support Apr 6, 2021
@pi0 pi0 added the enhancement New feature or request label Apr 6, 2021
@stieben
Copy link

stieben commented Apr 19, 2021

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?

@pi0
Copy link
Member

pi0 commented Apr 19, 2021

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.

@SimplyCorey
Copy link

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.

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

6 participants