vuejs / vetur

Vue tooling for VS Code.
https://vuejs.github.io/vetur/
MIT License
5.75k stars 593 forks source link

[VIDEO] Go to Definition in the same .vue file not working #3364

Open vadimcoder opened 2 years ago

vadimcoder commented 2 years ago

Info

Problem

Go to Definition > No definition found.

<template>
  <div class="hello">
    <h1>{{ msg }}</h1> <!-- msg -> Go to Definition  > No definition found. --!>
  </div>
</template>

<script>
export default {
  props: {
    msg: String
  }
}
</script>

Reproducible Case

The problem is not reproducible on https://github.com/octref/veturpack/generate. But it is reproducible on @vue/cli project:

npm install -g @vue/cli
vue create my-project

screencast 2022-03-01 8 PM-49-25

Video:

I recorded a proof screencast 52 seconds, but Github says it is too big. So I uploaded on youtube: https://www.youtube.com/watch?v=BB_gRYLgHyc

~~ Thanks, Vadim

Might be similar issues: https://github.com/vuejs/vetur/issues/2523 https://github.com/vuejs/vetur/issues/2341 https://github.com/vuejs/vetur/issues/3083

P.S.: I will appreciate any help because I don't want to get back to WebStorm!😀

EnjoyChan commented 2 years ago

the same to me, some output : Failed to transform template of ***index.vue.template [Error - 12:19:05 PM] TypeError: e.isPropertyAccessChain is not a function

hieu-ht commented 2 years ago

This VSCode extension works well for me, hope this help https://marketplace.visualstudio.com/items?itemName=zardoy.vetur-extended

yoyo930021 commented 1 year ago

Do you enable this vetur.experimental.templateInterpolationService in your setting? https://vuejs.github.io/vetur/guide/interpolation.html#generic-language-features