From 7646dc046eb562276231de8ec6a4df1bc691cafc Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 30 Dec 2019 20:29:21 +0100 Subject: Encapsulate highlighting activation --- editors/code/src/main.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'editors/code/src/main.ts') diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts index 7e63a9cac..45657532e 100644 --- a/editors/code/src/main.ts +++ b/editors/code/src/main.ts @@ -4,10 +4,10 @@ import * as lc from 'vscode-languageclient'; import * as commands from './commands'; import { activateInlayHints } from './inlay_hints'; import { StatusDisplay } from './status_display'; -import * as events from './events'; import * as notifications from './notifications'; import { Server } from './server'; import { Ctx } from './ctx'; +import { activateHighlighting } from './highlighting'; let ctx!: Ctx; @@ -37,6 +37,8 @@ export async function activate(context: vscode.ExtensionContext) { ); ctx.pushCleanup(watchStatus); + activateHighlighting(ctx); + // Notifications are events triggered by the language server const allNotifications: [string, lc.GenericNotificationHandler][] = [ [ @@ -49,11 +51,6 @@ export async function activate(context: vscode.ExtensionContext) { ], ]; - // The events below are plain old javascript events, triggered and handled by vscode - vscode.window.onDidChangeActiveTextEditor( - events.changeActiveTextEditor.makeHandler(), - ); - const startServer = () => Server.start(allNotifications); const reloadCommand = () => reloadServer(startServer); -- cgit v1.2.3