-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Ctrl+T does not list exported variables #8013
Comments
@Ciantic do you have a tsconfig.json / jsconfig.json file ? If so how does it look like and is the file exporting the globalStyles part of the project |
@dbaeumer here is gist you can clone: https://gist.github.com/Ciantic/50140f189abf3e83260e6aba7cedc5ce Clone that, open the folder in VS Code insiders, open the "openthis.ts", hit Ctrl+T and start typing "globalStyles", nothing is found. But it finds "Something" just fine. Edit I believe someone has designed Ctrl+T this way, but I can't understand why, having exported global values in symbols would be advantageous for navigation etc. If this is implemented: microsoft/TypeScript#188 the Ctrl+T could be used as primary GUI for importing a selected symbol, but it can't be used if it doesn't include all symbols. |
This gets filtered in the UI. We should remove that filtering code. |
Not filtering in the UI is still the right thing to do. Leaving it up to @dbaeumer to teach TypeScript to exclude some items |
IMO the last 'component' that should do any filtering is the language server / service. The service is asked to provide all workspace symbols the service should exactly return that. In the example @bpasero shows most of the errors are properties on interfaces. So I think we need different ways to show/ filter that view: by type (only classes, ....) and by scope (top level, nested). This requires work in the UI and in the API. What do you think? |
@dbaeumer I actually think that its imports like 👍 for addition grouping - as in quick outline. The information should be available since both provider return arrays of |
I also get stuff that I have imported e.g. I use globalStyles a lot, and it lists these as symbols:
I think import lines (which are not re-exports) should not be listed in the symbols listing. P.S. this change apparently removed all filtering, including "import something" what I wanted is to include P.S.S. I think "listing definitions" is more appropriate for Ctrl+T, I don't think people are using it to jump to import statements, but to definitions with typically export in front. |
@bpasero and I discussed it an neither filtering in the UI nor filtering in the model is the right solution. So we decided to have Ctrl+T list all workspace symbol and Ctrl+P only the global once. We will therefore add the container name to the symbol and check if this allows for proper filtering. I opened #8502 to track the UI changes. |
@dbaeumer sorry, but the imports are showing up without containerName so they still appear in CtrlCmd+P. |
Ctrl+T the project wide symbols listing can't find exported globals e.g.
It's visible in file wide symbols listing Ctrl+Shift+O, but not in the project wide symbol listing Ctrl+T.
The text was updated successfully, but these errors were encountered: