Cmd-clicking (or F12) on a Vue component import statement has no effect. It's impossible to jump to the file being clicked on.
We don't support omitting .vue file extension.
https://github.com/vuejs/vetur/issues/423#issuecomment-340235722
@HerringtonDarkholme Oh.. you should've told me all I had to do was add the .vue extension on my imports, and then it works. Is there any way to make the import suggestion add the extension automatically?
Sorry for being jumpy, but your filename https://github.com/ffxsam/no-goto/blob/master/src/components/NoWork.vue indicates you have realized the problem in that HelloWorld.vue did work.
You can install path intellisense in vscode. Its behavior doesn't make sense to me since it skip vue extension(but does keep file extension for png/html). I suggest you open a new issue there. You can also use https://github.com/ChristianKohler/PathIntellisense#file-extension-in-import-statements
@HerringtonDarkholme Path Intellisense doesn't work with .vue files and appears to be abandonware. Do you know of any other extensions that will do path autocompletion for Vue files?
I have the same problem, except I can't even go to the def of a function within the same .vue file!
Vetur v0.11.7, Mac
Why is this closed? I can't go to the definition even if I add the extension. Is this working for others? It works fine with JSX and react files.
Please provide a reproduction code repository if you meet a problem.
@HerringtonDarkholme here's a real life snippet from real vue code that exhibits this problem:
I:
<script>
import interact from 'interactjs'
export default {
// Our component name
name: "avatar-image",
// The properties available for our parent to edit
props: {
img: String,
imageHeight: Number,
imageWidth: Number,
cropperWidth: Number,
cropperHeight: Number,
shadow: Boolean
},
// Our state
data() {
return {
x: 0,
y: 0,
adjX: 0,
adjY: 0,
resizeHeight: 0,
resizeWidth: 0,
viewport: null,
outer: null
}
},
/**
* Prepare to render by setting up our viewport
*/
beforeUpdate() {
if (this.viewport) {
this.viewport.x = this.x;
this.viewport.y = this.y;
this.viewport.adjX = this.adjX;
this.viewport.adjY = this.adjY;
this.viewport.resizeWidth = this.resizeWidth;
this.viewport.resizeHeight = this.resizeHeight;
}
}
}
</script>
When I right click on any of my this.viewport... and click go to definition, I see "No definition found for 'viewport'"
Is this just not something Vetur is willing to support?
News?
I got this too.
Directory structure:
app.js
components/ArticleList.vue
I cannot [ctrl + click] into ArticleList.vue from app.js
import ArticleList from './components/ArticleList'
@arufian https://github.com/vuejs/vetur/blob/master/docs/FAQ.md#vetur-cant-recognize-components-imported-using-webpacks-alias. You can't omit .vue suffix.
I had this problem even when using the .vue extension. I fixed this by simply reinstalling Vetur:
Run command: Developer: Reinstall Extension for Vetur
https://github.com/vuejs/vetur/blob/master/docs/FAQ.md#no-syntax-highlighting--no-language-features-working
Need to add
VSCode is just an editor which is not ready for productivity.
You have to waste hours and hours every month to configure and to get things works right and putting plugin pieces to coordinate with harmony.
But, by using WebStorm, all these features are out of box.
Just give WebStorm a try and you will definitely love it!
News?
Upgrade or downgrade different version.
news?
@HerringtonDarkholme here's a real life snippet from real vue code that exhibits this problem:
I:
- Downloaded vscode fresh
- Installed vetur
- Opened this vue file
<script> import interact from 'interactjs' export default { // Our component name name: "avatar-image", // The properties available for our parent to edit props: { img: String, imageHeight: Number, imageWidth: Number, cropperWidth: Number, cropperHeight: Number, shadow: Boolean }, // Our state data() { return { x: 0, y: 0, adjX: 0, adjY: 0, resizeHeight: 0, resizeWidth: 0, viewport: null, outer: null } }, /** * Prepare to render by setting up our viewport */ beforeUpdate() { if (this.viewport) { this.viewport.x = this.x; this.viewport.y = this.y; this.viewport.adjX = this.adjX; this.viewport.adjY = this.adjY; this.viewport.resizeWidth = this.resizeWidth; this.viewport.resizeHeight = this.resizeHeight; } } } </script>When I right click on any of my
this.viewport...and click go to definition, I see "No definition found for 'viewport'"
Is this just not something Vetur is willing to support?
I have exactly the same problem
The Vue Peek extension works for me.
News?
Any news?
Waiting too!((
News?
News?
News?
Any update?
https://youtu.be/wJQykqGl2xs follow this
https://youtu.be/wJQykqGl2xs follow this
for users who prefer texts:
"vetur.experimental.templateInterpolationService": true,
Hello everyone,
This problem has many parts.
"vetur.experimental.templateInterpolationService": true.compilerOptions.paths in tsconfig.json/jsconfig.json.index.vue. Continue to leave comments here is not very helpful to everyone.
Because each person's reasons may be different.
I will lock this issue and you can open a new issue when have problems.
Most helpful comment
@HerringtonDarkholme here's a real life snippet from real vue code that exhibits this problem:
I:
When I right click on any of my

this.viewport...and click go to definition, I see "No definition found for 'viewport'"Is this just not something Vetur is willing to support?