mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 01:58:53 +01:00
Update JSON service to latest vscode-languageserver
This commit is contained in:
@@ -10,10 +10,6 @@ import {workspace, languages, ExtensionContext, extensions, Uri} from 'vscode';
|
||||
import {LanguageClient, LanguageClientOptions, RequestType, ServerOptions, TransportKind, NotificationType} from 'vscode-languageclient';
|
||||
import TelemetryReporter from 'vscode-extension-telemetry';
|
||||
|
||||
namespace TelemetryNotification {
|
||||
export const type: NotificationType<{ key: string, data: any }> = { get method() { return 'telemetry'; } };
|
||||
}
|
||||
|
||||
namespace VSCodeContentRequest {
|
||||
export const type: RequestType<string, string, any> = { get method() { return 'vscode/content'; } };
|
||||
}
|
||||
@@ -68,7 +64,7 @@ export function activate(context: ExtensionContext) {
|
||||
|
||||
// Create the language client and start the client.
|
||||
let client = new LanguageClient('JSON Server', serverOptions, clientOptions);
|
||||
client.onNotification(TelemetryNotification.type, e => {
|
||||
client.onTelemetry(e => {
|
||||
if (telemetryReporter) {
|
||||
telemetryReporter.sendTelemetryEvent(e.key, e.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user