Add restart TSServer command. Fixes #22335

This commit is contained in:
Matt Bierner 2017-05-24 15:07:43 -07:00 committed by Dirk Baeumer
parent 59e7fbc25e
commit 2890b5d8ab
3 changed files with 10 additions and 0 deletions

View file

@ -345,6 +345,11 @@
"command": "typescript.openTsServerLog",
"title": "%typescript.openTsServerLog.title%",
"category": "TypeScript"
},
{
"command": "typescript.restartTsServer",
"title": "%typescript.restartTsServer%",
"category": "TypeScript"
}
],
"menus": {

View file

@ -32,6 +32,7 @@
"typescript.referencesCodeLens.enabled": "Enable/disable references CodeLens in TypeScript files. Requires TypeScript >= 2.0.6.",
"typescript.implementationsCodeLens.enabled": "Enable/disable implementations CodeLens. Requires TypeScript >= 2.2.0.",
"typescript.openTsServerLog.title": "Open TS Server log",
"typescript.restartTsServer": "Restart TS server",
"typescript.selectTypeScriptVersion.title": "Select TypeScript Version",
"jsDocCompletion.enabled": "Enable/disable auto JSDoc comments",
"javascript.implicitProjectConfig.checkJs": "Enable/disable semantic checking of JavaScript files. Existing jsconfig.json or tsconfig.json files override this setting. Requires TypeScript >=2.3.1.",

View file

@ -109,6 +109,10 @@ export function activate(context: ExtensionContext): void {
client.openTsServerLogFile();
}));
context.subscriptions.push(commands.registerCommand('typescript.restartTsServer', () => {
client.restartTsServer();
}));
const goToProjectConfig = (isTypeScript: boolean) => {
const editor = window.activeTextEditor;
if (editor) {