-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.feature requestNew feature or requestNew feature or request
Description
Description
I'm always frustrated when I always have to do a global file search in VSCode (ctrl + shift +F) in order to find out where a particular svelte component is used throughout the codebase. I do not assume it is imported with the same name so I will search by its path that I would expect to be in the import from
For example, given the example repo when I do a "Where Used" on Button.svelte, I would expect to see the following references
- App.svelte
- import Button from "./Button.svelte";
- main.ts
- import Button from "./Button.svelte";
Proposed solution
- A new menu item when you right click a .svelte file in the Explorer view named something like "Go To References" , "Find Imports", "Where Used"

Running the command would then provide you a similar window as below and drilling inside the folder structure would show you the import statement for the component (blue line)
- Right clicking inside the white area of a .svelte file to provide the same menu option
Alternatives
Global VScode search in all files
Additional Information, eg. Screenshots
Sample repo https://github.com/Jojoshua/sveltejs-where-imports-used
- Similar to Go to References - to where the component is used #1210 but I am not expecting to see where the Components themselves are used in the HTML sections, only the imports sections so I can get an idea of my overall architecture
Reference #1484
Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.feature requestNew feature or requestNew feature or request

