aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/main.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-30 19:29:21 +0000
committerAleksey Kladov <[email protected]>2019-12-30 20:32:04 +0000
commit7646dc046eb562276231de8ec6a4df1bc691cafc (patch)
tree3820a5c89a7b6317373fca4d68cab01912cc24f6 /editors/code/src/main.ts
parent17dda0972a68dd88a766c223390317dc2cb3ea00 (diff)
Encapsulate highlighting activation
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r--editors/code/src/main.ts9
1 files changed, 3 insertions, 6 deletions
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';
4import * as commands from './commands'; 4import * as commands from './commands';
5import { activateInlayHints } from './inlay_hints'; 5import { activateInlayHints } from './inlay_hints';
6import { StatusDisplay } from './status_display'; 6import { StatusDisplay } from './status_display';
7import * as events from './events';
8import * as notifications from './notifications'; 7import * as notifications from './notifications';
9import { Server } from './server'; 8import { Server } from './server';
10import { Ctx } from './ctx'; 9import { Ctx } from './ctx';
10import { activateHighlighting } from './highlighting';
11 11
12let ctx!: Ctx; 12let ctx!: Ctx;
13 13
@@ -37,6 +37,8 @@ export async function activate(context: vscode.ExtensionContext) {
37 ); 37 );
38 ctx.pushCleanup(watchStatus); 38 ctx.pushCleanup(watchStatus);
39 39
40 activateHighlighting(ctx);
41
40 // Notifications are events triggered by the language server 42 // Notifications are events triggered by the language server
41 const allNotifications: [string, lc.GenericNotificationHandler][] = [ 43 const allNotifications: [string, lc.GenericNotificationHandler][] = [
42 [ 44 [
@@ -49,11 +51,6 @@ export async function activate(context: vscode.ExtensionContext) {
49 ], 51 ],
50 ]; 52 ];
51 53
52 // The events below are plain old javascript events, triggered and handled by vscode
53 vscode.window.onDidChangeActiveTextEditor(
54 events.changeActiveTextEditor.makeHandler(),
55 );
56
57 const startServer = () => Server.start(allNotifications); 54 const startServer = () => Server.start(allNotifications);
58 const reloadCommand = () => reloadServer(startServer); 55 const reloadCommand = () => reloadServer(startServer);
59 56