unplugin / unplugin-vue-components

📲 On-demand components auto importing for Vue
https://www.npmjs.com/package/unplugin-vue-components
MIT License
3.66k stars 341 forks source link

Go To Definition navigates to component.d.ts file instead of the vue component #723

Open colinblaise opened 7 months ago

colinblaise commented 7 months ago

Describe the bug

When I click F12 or Go To Definition on a component in my template, it navigates to the component.d.ts file instead of the actual vue component.

Perhaps I am missing some configuration that is preventing this from working? Am I wrong in expecting the correct behavior to navigate directly to the component?

Reproduction

Using latest Vue 2.X

System Info

System:
    OS: Windows 11 10.0.22621
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i9-12900K
    Memory: 20.80 GB / 63.70 GB
  Binaries:
    Node: 21.2.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
  Managers:
    pip2: 19.2.3 - C:\Python27\Scripts\pip2.EXE
  Utilities:
    Git: 2.43.0.
    Curl: 8.4.0 - C:\Windows\system32\curl.EXE
  Virtualization:
    Docker: 24.0.6 - C:\Program Files\Docker\Docker\resources\bin\docker.EXE
  IDEs:
    VSCode: 1.84.2 - C:\Program Files\Microsoft VS Code\bin\code.CMD
    Visual Studio: 17.8.34227.203 (Visual Studio Enterprise 2022), 17.7.34221.43 (Visual Studio Enterprise 2022)
  Languages:
    Bash: 5.0.17 - C:\Windows\system32\bash.EXE
    Java: 11.0.16.1
    Python: 2.7.18
  Browsers:
    Edge: Chromium (119.0.2151.72)
    Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Validations

Acetyld commented 6 months ago

Would love to find a workaround for this

waynzh commented 3 months ago

If you're using VSCode, you might want to try out this extension.

jclaveau commented 5 days ago

Nice! This should be in the docs

Acetyld commented 3 days ago

If you're using VSCode, you might want to try out this extension.

Is there a Intellij alternative (webstorm for example)?