-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
TypeScript file needs to be open for symbol search to work #17393
Comments
Fixes microsoft#17393 Makes the TS extension activate when the top level folder opened contains a jsconfig or tsconfig file
@dbaeumer I sent out a PR #17412 to make the TS extension activate when the workspace contains a jsconfig or tsconfig file, but this alone will not fix this issue. We'll still need to update the workspaceSymbolProvider to be smarter about finding a ts file for the |
@mjbvz without good support for this from TSServer this will never be a nice experience so I stayed away from doing workarounds here. For example the contains tsconfig.json (or jsconfig.json) only works if these files are in the root. It doesn't if in a sub folder. So adding this might cause more confusion than it helps. In addition it is very hard to pick the right TS file for the NavTo request (consider that case where you have 2 tsconfig.json files in one workspace folder). IMO we need to ask the TS team to provide us with a request without a file and they do the smartness of opening and scanning the projects. As said I would push the TS team for better support here. Regarding activation: @bpasero and I discussed that a while ago and we came to the conclusion that we need a 'project' info to do that proper. So for example if a workspace is marks (somehow) as a TS workspace then we could activate the TSServer more eagerly to fulfill a workspace symbol request. However we didn't come up with a design how and where such a TS project indication should be store |
FYI I have this prioritized on my end. |
Thank you everyone for your responses. Just to give some feedback as a user, I would feel comfortable being asked to provide something in the workspace config to tell VSCode how to treat the project. I feel like that's a little similar with how I have to specify a tasks.json file to tell VSCode how to build the TypeScript. But as always, if it could |
I believe this is a duplicate of #17022 |
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: