Preview feature: vscode v1.45 should improve on symbol searching across javascript and typescript projects without having all the files open. See https://github.com/microsoft/vscode/issues/11026 and https://github.com/microsoft/vscode/issues/11026 (js/ts workspace symbol search only works if you have loaded a js/ts file).
Added with a new setting: typescript.workspaceSymbols.scope
. Valid
values are:
allOpenProjects
— (default) search all opened projects for symbols.
Requires TS 3.9+
currentProject
— Only search the current project
- above from the first link.
#11026
Improved this. You no longer need to have a JS/TS file open for workspace symbol search to work and we can now search across all JS/TS
projects you know about.
If you are using TS 3.9, all projects should be searched by default
On older TS versions, only the current project should be searched. If
using TS 3.9, you can switch to only search the current project by
setting: "typescript.workspaceSymbols.scope": "currentProject"
However we still require you to have opened a JS/TS file
- above from the second link.
Also see the v1.45 release notes : https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_45.md#workspace-symbol-search-in-all-open-typescriptjavascript-projects
When using TypeScript 3.9+, VS Code's workspace symbol
search
now includes results from all opened JavaScript and TypeScript
projects by default. We previously only searched the project of the
currently active file.
This is controlled by the new "typescript.workspaceSymbols.scope"
setting. To revert to the old behavior, just set:
"typescript.workspaceSymbols.scope": "currentProject"
.
To see what version of typescript you have and how to install a newer version, see https://stackoverflow.com/a/39676463/836330. And https://stackoverflow.com/a/47087772/836330 is good.
v1.46 release notes: searching for symbols across projects in a workspace
JS/TS Go to Symbol in workspace includes all opened projects
By default, workspace symbol
search
for JavaScript and TypeScript now search all opened jsconfig and
tsconfig projects. It previously only included search results from the
project the focused file belonged to.
This behavior is controlled by the typescript.workspaceSymbols.scope
setting and requires TS 3.9+. To revert the to previous behavior and
only search the current project, just set
"typescript.workspaceSymbols.scope": "currentProject"