If you search the issues here on GitHub and on StackOverflow, you'll find that there is a ton of fragmentation around this feature for a few reasons:
This feature refers to three subsets of finding references:
1. Find all references of a symbol
VSCode has this already.
2. Find all references of a file
VSCode has this already, but few know about it, and the process for getting to it is unnecessary. Currently you need to use the "find all references" command on an import path that includes the file.
This is a very useful feature, and should be made available in the file explorer, for a file's context menu when right clicking it, as explained here. Additionally, there should be a command, References: Find All References of File as explained here.
3. Find all references of a folder
VSCode does not yet have this feature. When using this on a folder (made available in the context menu), it should show the references for all files inside that folder. A command might be useful here as well (References: Find All References of Folder).
Note:
I've already submitted a feature request mentioning this in the past, which was closed and suggested as an extension. However, it looks like I wasn't clear on what my request was, because VSCode has since implemented a lot of this functionality. And it's also clear that there's a lot of confusion around this among VSCode users.
(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
I spent one day for this, and the result was no way to achieve it.
sadly.
@jabacchetta Was there any progress on this?
For me, in simple ES6 code with export and import in several files, there's no way to find the references.
If I right click the exported symbol and click Find All References, it will only find references in the open files in the editor, which is not so useful.
@alexilyaev
The features that I've requested here haven't been added yet, but what you're describing should work, if I understand correctly.
Are you importing index.js files without explicitly using the entire path (leaving off index.js) by chance? If so, #66170 might be helpful.
Edit: Woops, just noticed that you already solved your problem in issue above.
It only works after adding jsconfig.json, but still, you need to pick a specific export to search references for, you can't search for all references to the whole module (as you suggest).
This is the single biggest disappointment coming from WebStorm. VSCode wins in so many ways. The two areas that cause weekly pain are:
Finally in the backlog, which will take like 2 years or more. But at least there's a milestone.
I can't believe people can keep using VSCode without a proper "find usages". It is the only reason I still stick with Sublime Text.
For me as a PHP developer, there's no way you can deal with non-namespace, autoloaded methods and functions without find usages.
Most helpful comment
This is the single biggest disappointment coming from WebStorm. VSCode wins in so many ways. The two areas that cause weekly pain are: