-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Salsa doesn't show any outline for this source code #6644
Comments
|
Well, imagine the following use-case: I have configured the module system to be commonjs. I am in a consumer of the module and do Ctrl-Space on the module. I get to see |
It seems reasonable. Things exported are conceptually 'top level' in how you thing about a module. Ryan, how hard would it be to surface CommonJS style exports as top level items for navigation? |
@egamma What API does VS Code use to populate the list? |
I believe it is the 'navbar' command VSCode side and TypeScript side (or perhaps 'navto'?) |
Note: Just stepped into it in the debugger - it is 'navbar', which ultimately calls into getNavigationBarItems. |
Need to come up with a design for this. This is neither a function declaration, nor a global value, so we don't put it in the nav bar today. Arguably we should treat exports specially here. |
Changing the navbar for TypeScript and JavaScript would be quite invasive at this late point for 1.8, but seeing as the JavaScript support is quite new, we can special case JavaScript behavior to temporarily make this experience better, then work to align the JavaScript and TypeScript (and 'navbar' and 'navto' logic) longer term. After discussion with @egamma, @jrieken, and @mhegazy , I've come up with something like can be seen below. The logic is contained in this commit (not yet merged anywhere). Basically any function/method is a container of other items. They are named by either the given name, or the property/variable they are assigned to (e.g. It needs a little tidy up (e.g. getters/setters aren't done yet) and hardening, but let me know if this looks good for your needs. |
👍 |
This looks good and it is a huge improvement 👍 |
From @alexandrudima on January 27, 2016 10:39
Testing #2218
No
jsconfig.json
Copied from original issue: microsoft/vscode#2427
The text was updated successfully, but these errors were encountered: