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

script template Out of sync between #462

Closed
zhangenming opened this issue Sep 7, 2021 · 5 comments
Closed

script template Out of sync between #462

zhangenming opened this issue Sep 7, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@zhangenming
Copy link

zhangenming commented Sep 7, 2021

image
Single click variable activeMode , can't highlight activeMode in template
image
Double click variable activeMode , also highlight activeModeElse in script

@johnsoncodehk johnsoncodehk added the enhancement New feature or request label Sep 7, 2021
@johnsoncodehk
Copy link
Member

Thanks for the report! But this required changes is conflict to embedded language support design, script code and template code actually in different virtual scripts, selection ranges is not easy to support cross file.

On the other hand, I'm not sure if this is the right design, because variables are different sources in script and template.

@zhangenming
Copy link
Author

image
The API will automatically find all the variables,
Is it helpful for this need? thanks

@rodrigocfd
Copy link

On the other hand, I'm not sure if this is the right design, because variables are different sources in script and template.

@johnsoncodehk Although technically they are different variables, for development purposes they are, effectively, the same. Highlighting simultaneously in both scripts would be extremely useful in large components.

Please reconsider implementing this. Thank you.

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Jun 4, 2022

@rodrigocfd Unfortunately I haven't thought of a proper way to implement it currently, use find references on each mouse click sounds too much calculate.

@rodrigocfd
Copy link

Hi @johnsoncodehk, I just want to report that I updated Volar this morning and this feature is working. I consider it a huge quality of life improvement.

Thank you very much for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants