Skip to content

Commit

Permalink
feat(vscode): enable type tree in jsx contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsdev committed Oct 29, 2022
1 parent 560e0a0 commit 3538e64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/typescript-explorer-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
],
"activationEvents": [
"onLanguage:typescript",
"onLanguage:javascript",
"onLanguage:typescriptreact",
"onLanguage:javascriptreact",
"onView:type-tree",
"onCommand:typescriptExplorer.typeTree.view.refresh",
"onCommand:typescriptExplorer.typeTree.view.icons.enabled.toggle",
Expand Down Expand Up @@ -193,7 +196,7 @@
{
"command": "typescriptExplorer.selection.select",
"group": "type-explorer",
"when": "editorLangId == 'typescript' || editorLangId == 'javascript'"
"when": "editorLangId == 'typescript' || editorLangId == 'javascript' || editorLangId == 'typescriptreact' || editorLangId == 'javascriptreact'"
}
]
},
Expand Down
7 changes: 6 additions & 1 deletion packages/typescript-explorer-vscode/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,10 @@ export function showError(message: string) {
}

export function isDocumentSupported({ languageId }: vscode.TextDocument) {
return languageId === "typescript" || languageId === "javascript"
return (
languageId === "typescript" ||
languageId === "javascript" ||
languageId === "typescriptreact" ||
languageId === "javascriptreact"
)
}

0 comments on commit 3538e64

Please sign in to comment.