Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jump to definition support for template interpolation #670

Closed
3 tasks done
songxing10000 opened this issue Jan 25, 2018 · 11 comments
Closed
3 tasks done

Jump to definition support for template interpolation #670

songxing10000 opened this issue Jan 25, 2018 · 11 comments

Comments

@songxing10000
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Info

  • Platform: macOS10.12.6 (16G29)
  • Vetur version:0.11.6
  • VS Code version:1.19.2

Problem


@songxing10000
Copy link
Author

songxing10000 commented Jan 25, 2018

In addition,when I install vetur and weex in VSCode,vetur will make weex code snippet not work
image

another question, Not highlighted
image

@HerringtonDarkholme HerringtonDarkholme changed the title when click or press command key click the class string in template label or click @click method it not jump the style or method implementation Jump to definition support for template interpolation Jan 25, 2018
@HerringtonDarkholme
Copy link
Member

Jump to definition hasn't been supported in template interpolation. We may support it in future.

I don't understand your second comment. Do you mean the syntax highlight is lost?

@songxing10000
Copy link
Author

@HerringtonDarkholme yes, the syntax highlight is lost,just becase:src=somevalue

@HerringtonDarkholme
Copy link
Member

#648

@HerringtonDarkholme
Copy link
Member

Close this in favor of #209

@sethidden
Copy link
Contributor

sethidden commented Oct 31, 2019

So now https://vuejs.github.io/vetur/interpolation.html#generic-language-features says

Currently diagnostics, hover, jump to definition and find references are implemented in this way:

so I'm assuming "go to definition inside template" should work

I have "vetur.experimental.templateInterpolationService": true enabled and when I press Go To Definition on a method name in template, I get the:
Unable to open 'HelloWorld.vue': resource is not available. error.

obraz

This is Vetur 0.22.6 and all other extensions are disabled. This is the vue cli 4 default (babel+eslint) template. The error happens after I press "Go to definition" on "handleClick" in the button in the template

[2019-10-31 22:07:29.459] [renderer1] [error] resource is not available: Error: resource is not available
    at v.createReferencedObject (file:///C:/Users/atagisow/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4888:687)
    at v.createReferencedObject (file:///C:/Users/atagisow/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/workbench/workbench.desktop.main.js:4888:652)
    at process._tickCallback (internal/process/next_tick.js:68:7)

@octref
Copy link
Member

octref commented Dec 12, 2019

@3nuc Please open new issue with repro. Much easier to track them. Thanks.

EDIT: NVM. I just see #1484.

@ffxsam
Copy link

ffxsam commented Jul 1, 2021

Still an issue in 2021. Is there a reason this basic functionality is not possible?

@yoyo930021
Copy link
Member

Still an issue in 2021. Is there a reason this basic functionality is not possible?

Please open vetur.experimental.templateInterpolationService: true and try again.
If not work, open a new issue and provide a repro case.

@ffxsam
Copy link

ffxsam commented Jul 1, 2021

@yoyo930021 Works great, thank you! 🎉

@mzvast
Copy link

mzvast commented Jun 14, 2023

@yoyo930021 You are my hero!Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants