-
Notifications
You must be signed in to change notification settings - Fork 590
"Go to definition" on vue components goes to vue.d.ts #45
Comments
Same here. And I have done some search, I am not sure is this relevant? This is quite weird, since "Go to definition" works perfectly well in *.vue files. |
@octref or @HerringtonDarkholme is this a Vetur bug? |
Nope, Vetur cannot handle "jump to definition" in
Vetur can handle definition lookup in vue file, but it cannot hijack the behavior of TS.
This is expected. Instead of using I didn't invest much time in it, but it can handle basic definition lookup as far as I tried. |
Thanks @HerringtonDarkholme ! I'll test that in a bit. I wonder if jumping from a module to its source versus jumping to its type definition is worth supporting in the module declaration syntax itself somehow. @weswigham because you worked on microsoft/TypeScript#6209 I thought you might be able to weigh in. |
In 2.9 the language service will support reading sourcemaps for |
I just wanted to chime in here to say that https://github.com/HerringtonDarkholme/vue-ts-plugin works like a charm for "jump to definition" in VS Code. Thanks @HerringtonDarkholme 👍 |
Repro steps:
index.ts
in VS codeGo to Definition
onHelloComponent
vue.d.ts
. When going to the definition of"./components/Hello.vue"
I'm taken tovue-shims.d.ts
instead.Is this a known issue?
The text was updated successfully, but these errors were encountered: