mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 22:12:26 +01:00
Fixes #1342
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noLib": true,
|
||||
"target": "ES5",
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"sourceMap": true,
|
||||
"sourceMap": false,
|
||||
"outDir": "../out"
|
||||
},
|
||||
"exclude": [
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* ------------------------------------------------------------------------------------------ */
|
||||
'use strict';
|
||||
|
||||
import { languages, workspace, Uri, ExtensionContext, IndentAction, Diagnostic, DiagnosticCollection, Range } from 'vscode';
|
||||
import { languages, commands, workspace, Uri, ExtensionContext, IndentAction, Diagnostic, DiagnosticCollection, Range } from 'vscode';
|
||||
|
||||
import * as Proto from './protocol';
|
||||
import TypeScriptServiceClient from './typescriptServiceClient';
|
||||
@@ -41,6 +41,9 @@ export function activate(context: ExtensionContext): void {
|
||||
client.onReady().then(() => {
|
||||
registerSupports(MODE_ID_TS, clientHost, client);
|
||||
registerSupports(MODE_ID_TSX, clientHost, client);
|
||||
context.subscriptions.push(commands.registerCommand('typescript.reloadProjects', () => {
|
||||
clientHost.reloadProjects();
|
||||
}));
|
||||
}, () => {
|
||||
// Nothing to do here. The client did show a message;
|
||||
})
|
||||
@@ -166,6 +169,11 @@ class TypeScriptServiceClientHost implements ITypescriptServiceClientHost {
|
||||
return this.client;
|
||||
}
|
||||
|
||||
public reloadProjects(): void {
|
||||
this.client.execute('reloadProjects', null, false);
|
||||
this.triggerAllDiagnostics();
|
||||
}
|
||||
|
||||
public addBufferSyncSupport(support: BufferSyncSupport): void {
|
||||
this.bufferSyncSupports.push(support);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user