-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
“Find All References” across files for a method/function in javascript #21507
Comments
I think related to #20924 |
I just looked at the thread. That does not have a resolution either? Any idea if this is being looked up on priority? |
Any update on this? Maybe I have something set incorrectly, but I have jsx files with extensions filename.react.js. I want to be able find all references of an exported function, react component class, etc., but I get no results when attempting this. Any suggestions? |
The original issue is certainly microsoft/TypeScript#6942; TypeScript doesn't resolve AMD-style imports. |
Is it intended that CommonJS module references don't get shown in Find All References too? I have jsconfig.json in the root but it doesn't work. |
@Hoishin Could you provide a repro? |
@andy-ms EDIT: actually, as you can see, extensions were not disabled, but it was the same as below if I disable all extensions and all settings Yes! env:
{
"editor.renderWhitespace": "all",
"editor.rulers": [
80,
100
],
"explorer.confirmDragAndDrop": false,
"files.autoSave": "onFocusChange",
"files.insertFinalNewline": true,
"instantmarkdown.autoOpenBrowser": false,
"sync.anonymousGist": false,
"sync.askGistName": false,
"sync.autoDownload": true,
"sync.autoUpload": true,
"sync.gist": "<removed but has gist id>",
"sync.lastDownload": "2018-02-27T17:47:11.358Z",
"sync.lastUpload": "2018-02-27T18:30:16.262Z",
"sync.forceDownload": false,
"sync.host": "",
"sync.pathPrefix": "",
"sync.quietSync": false,
"workbench.colorTheme": "Dracula",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "none",
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"window.zoomLevel": 0,
"markdown.extension.preview.autoShowPreviewToSide": true
} procedure:
|
@Hoishin In that case the export has no name so we don't have references for it. If you write |
@andy-ms Ah, I see. You have to have name it and/or assign to variable, and find reference from those instead of |
@andy-ms Also, it might be unrelated, but it would be nice if I can also see server.plugin = {
plugin: require('awsome-plugin'),
options: require('./config/awesome-plugin'), // shown in find-all-references in awsome-plugin.js
}; Might be too much of asking though... |
@andy-ms I've been playing with Reference All References today. I found that the way you export affect Find All References, outside of what I have mentioned so far. const something = 1234;
module.exports = {something}; // doesn't work
module.exports = {something: something}; // doesn't work
module.exports.something = something; // works These are kind of reasonable from what you have said, since in the first two situations, the actual exported objects are not named, while the third one exports the named object directly. |
Closing this generic issue in favor of tracking individual case that are causing problems. Since Please open a new issue with some example code or small example project if you see |
I also found that If I try to "Find All References" on the exported object it worked- if I do it earlier in the file, it doesn't. |
I'm struggling with this as well. Attempting to find usages of a file. I need to find other files that import this file. |
@stephengardner You should be able to run find-all-references on the |
@andy-ms Similar to |
Steps to Reproduce:
1.Select a method in javascript
2.Right click on Find all References
Expected Result: Find all references across files in a project
Actual Result: finds references in the current file.
Note: The project i'm working on uses requirejs to load and utilize module dependencies.
The text was updated successfully, but these errors were encountered: