vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Goto Symbol doesn't show all functions defined inside the file.

Open trash opened this issue 11 years ago • 5 comments

Using "Go To Symbol..." (⇧⌘O) it seems to only recognize certain ways of declaring functions in javascript.

screen shot 2015-11-18 at 5 49 37 pm

All three functions should show up when you search "searchable", right? Only "searchable" and "alsoSearchable" show up however.

In this case it looks like these cases work:

  1. Anonymous function assigned as a property on and object when the object is instantiated.
  2. Named function assigned as a property on an object after it's instantiated.

And this case doesn't work:

  1. Anonymous function assigned as a property on an object after it's already been instantiated.

This works in Sublime Text and I'd love if it could work in VS Code as well as it's one of the main ways I navigate my javascript code (especially the thousands of lines of code for my game).

trash avatar Nov 18 '15 23:11 trash

This issue is present in this case too: When I have a function defined as var testFunction = function() {}

Here is a screenshot with the issue: http://imgur.com/wS66ROM

yupal avatar Feb 10 '16 10:02 yupal

Can you please try to reproduce using the new Salsa JS infrastructure: https://code.visualstudio.com/updates/#_javascript-salsa-preview

egamma avatar Feb 10 '16 11:02 egamma

Using Salsa JS on the same example as I wrote before I get IntelliSense knowing the function, but now when I try to go to symbol I got no suggestion ( the go to symbol ( @ ) returns an empty list ).

yupal avatar Feb 10 '16 12:02 yupal

Moving to salsa for investigation

egamma avatar Feb 10 '16 15:02 egamma

This issue was moved to Microsoft/TypeScript#7003

egamma avatar Feb 10 '16 15:02 egamma