Description
There currently is no intuitive way to find references to a component from within the component.
- One has to know about the special command
Svelte: Find Component References
- The regular commands do not work:
Go to References (would be equivalent to above command)
References: Find All References (has no equivalent, shows references in the side bar)
Proposed solution
- Add a lens at the top of the component file that behaves like that in JS/TS files
- If the count cannot easily be determined dynamically it could just say "Go to references"
- Essentially already implemented as
Svelte: Find Component References
- If there is a way to make the standard commands work, integrate them.
Since those can be used on other symbols, I was thinking that maybe with the cursor on the <script> tag it could search for component references. Of course still not ideal, as components can just omit that entirely as well...
- If standard commands can not be integrated, maybe add a separate
Svelte: ... command that shows references in the side bar, not sure if that is possible either, though.
Alternatives
Stick with Svelte: Find Component References and global search, if a more persistent list is required (e.g. for checking every single usage site).
Additional Information, eg. Screenshots
No response
Description
There currently is no intuitive way to find references to a component from within the component.
Svelte: Find Component ReferencesGo to References(would be equivalent to above command)References: Find All References(has no equivalent, shows references in the side bar)Proposed solution
Svelte: Find Component ReferencesSince those can be used on other symbols, I was thinking that maybe with the cursor on the
<script>tag it could search for component references. Of course still not ideal, as components can just omit that entirely as well...Svelte: ...command that shows references in the side bar, not sure if that is possible either, though.Alternatives
Stick with
Svelte: Find Component Referencesand global search, if a more persistent list is required (e.g. for checking every single usage site).Additional Information, eg. Screenshots
No response