Add find all references command for JS/TS

Fixes #66150
This commit is contained in:
Matt Bierner
2021-01-04 16:55:11 -08:00
parent 0f9ee98846
commit b565c422aa
7 changed files with 163 additions and 1 deletions

View File

@@ -49,6 +49,7 @@
"onCommand:workbench.action.tasks.runTask",
"onCommand:_typescript.configurePlugin",
"onCommand:_typescript.learnMoreAboutRefactorings",
"onCommand:typescript.fileReferences",
"onLanguage:jsonc"
],
"main": "./out/extension",
@@ -961,6 +962,11 @@
"command": "typescript.restartTsServer",
"title": "%typescript.restartTsServer%",
"category": "TypeScript"
},
{
"command": "typescript.findAllFileReferences",
"title": "%typescript.findAllFileReferences%",
"category": "TypeScript"
}
],
"menus": {
@@ -1008,6 +1014,46 @@
{
"command": "typescript.restartTsServer",
"when": "typescript.isManagedFile"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && typescript.isManagedFile"
}
],
"explorer/context": [
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == javascript"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == javascriptreact"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == typescript"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == typescriptreact"
}
],
"editor/title/context": [
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == javascript"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == javascriptreact"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == typescript"
},
{
"command": "typescript.findAllFileReferences",
"when": "tsSupportsFileReferences && resourceLangId == typescriptreact"
}
]
},