Skip to content

feat(language-service): document links for template refs #5385

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alex-snezhko
Copy link

Adds LSP document links for template refs in setup script referencing the corresponding element(s) in the template.

This is a small QoL feature that is useful in my opinion as it makes it clear that the template reference is valid and traversable, in the same manner as the existing CSS class definition document link feature.

Screenshots in VS Code

Overview:
Screenshot From 2025-05-27 20-37-34

Traversing link targets correct range in template:
Screenshot From 2025-05-27 20-38-06

Hovering the multi-element ref shows multiple links:
Screenshot From 2025-05-27 20-37-45

Copy link

pkg-pr-new bot commented May 28, 2025

Open in StackBlitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5385

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5385

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5385

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5385

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5385

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5385

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5385

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5385

commit: fc3976f

@alex-snezhko alex-snezhko force-pushed the template-ref-doc-links branch from 43fbb1d to a30eef1 Compare May 28, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants