Add Command to Go To / Create project configuration for an active js or ts file (#20362)

* Add Command to Go To / Create project configuration for an active js or ts file

Part of #20356

Adds a new command that opens the jsconfig or tsconfig project configuration file for the currently active file. If one does not exist, displays a quick pick that allows users to learn more and create a config file at the root of their project

* Add messages for error cases

* Work around ts error
This commit is contained in:
Matt Bierner
2017-02-13 12:58:40 -08:00
committed by GitHub
parent d3cbe86479
commit 5db8fd0f55
3 changed files with 116 additions and 9 deletions

View File

@@ -33,7 +33,9 @@
"onLanguage:jsx-tags",
"onCommand:typescript.reloadProjects",
"onCommand:javascript.reloadProjects",
"onCommand:typescript.selectTypeScriptVersion"
"onCommand:typescript.selectTypeScriptVersion",
"onCommand:javascript.goToProjectConfig",
"onCommand:typescript.goToProjectConfig"
],
"main": "./out/typescriptMain",
"enableProposedApi": true,
@@ -257,15 +259,28 @@
"commands": [
{
"command": "typescript.reloadProjects",
"title": "%typescript.reloadProjects.title%"
"title": "%typescript.reloadProjects.title%",
"category": "TypeScript"
},
{
"command": "javascript.reloadProjects",
"title": "%javascript.reloadProjects.title%"
"title": "%javascript.reloadProjects.title%",
"category": "JavaScript"
},
{
"command": "typescript.selectTypeScriptVersion",
"title": "%typescript.selectTypeScriptVersion.title%"
"title": "%typescript.selectTypeScriptVersion.title%",
"category": "TypeScript"
},
{
"command": "typescript.goToProjectConfig",
"title": "%typescript.goToProjectConfig.title%",
"category": "TypeScript"
},
{
"command": "javascript.goToProjectConfig",
"title": "%javascript.goToProjectConfig.title%",
"category": "JavaScript"
}
],
"breakpoints": [
@@ -301,4 +316,4 @@
}
]
}
}
}