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

Intellisense (Go to Definition/Peek) of methods doesn't work if I have computed property within same .vue file #2425

Closed
4 tasks done
bahung1221 opened this issue Nov 2, 2020 · 2 comments

Comments

@bahung1221
Copy link

bahung1221 commented Nov 2, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: macOS
  • Vetur version: 0.19 -> 0.28.0 (I tried to downgrade through a lot of vetur versions but it still doesn't work)
  • VS Code version: 1.49 -> 1.50 (latest)

Problem

I can't call go to definition or peek definition of all methods when I have any computed property that was declared in the same vue instance, both call from script and template just showed "No definition found for...".
If I remove computed, It will work fine!

Screen Shot 2020-11-02 at 13 25 19

I also tried to removed all extensions and then reinstall both vscode and vetur but no luck.
You can check the reproduce repository below that I successfully reproduced.

Reproducible Case

Just install vscode and install only vetur and then try to create a method and a computed property that use this instance inside .vue file.

Reproduce commit:
https://github.com/bahung1221/reproduce-vetur-intellisense/commit/088fef34b99c72dc20672e2c833f3ce5c66d9781

Thank you so much!

@octref octref closed this as completed Nov 2, 2020
@bahung1221
Copy link
Author

Thanks for your respond, it worked now 😄

For those who don't use vue with typescript, just add typescript < v3.4 to your project devDependencies:

yarn add -D typescript@3.2.4

Then add "vetur.useWorkspaceDependencies": true, to your vscode setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants