Skip to content

Go to definition not working for Custom Elements inside .vue templates #6022

@shonya3

Description

@shonya3

Vue - Official extension or vue-tsc version

Extension: Vue (Official) v3.2.7

VSCode version

1.116.0

Vue version

3.5.33

TypeScript version

6.0.3

System Info

System:
    OS: Linux 6.17 Linux Mint 22.3 (Zena)
    CPU: (12) x64 AMD Ryzen 5 3600X 6-Core Processor
    Memory: 4.86 GB / 15.56 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 24.15.0 - /home/shonya/.vite-plus/js_runtime/node/24.15.0/bin/node
    npm: 11.12.1 - /home/shonya/.vite-plus/js_runtime/node/24.15.0/bin/npm
    pnpm: 10.33.0 - /home/shonya/.local/share/pnpm/pnpm
  Browsers:
    Brave Browser: 147.1.89.141
    Chrome: 147.0.7727.101
    Firefox: 149.0.2
    Firefox Developer Edition: 149.0.2

package.json dependencies

{
  "dependencies": {
    "lit": "^3.3.2",
    "vue": "^3.5.32"
  },
  "devDependencies": {
    "@types/node": "^24.12.2",
    "@vitejs/plugin-vue": "^6.0.6",
    "@vitejs/plugin-vue-jsx": "^5.1.5",
    "@vue/tsconfig": "^0.9.1",
    "typescript": "~6.0.2",
    "vite": "catalog:",
    "vite-plus": "catalog:",
    "vue-tsc": "^3.2.7"
  },
}

Steps to reproduce

  1. download reproduction repo
  2. open vscode
  3. install deps
  4. open App.vue and try to use "Go to definition" on lit-counter

What is expected?

In App.vue template, Ctrl+click / F12 / "Go to definition" should work for lit-counter (if this element has proper typings for vue)

What is actually happening?

"Go to definition" not working.
But vue vscode extension still properly reports missing variables. Or shows props, when i hover lit-counter.

Link to minimal reproduction

https://github.com/shonya3/vue-lang-go-to-reproduction

Any additional comments?

A also checked "Go to definition" for custom elements for Vue JSX. It works.
App.tsx file included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions