aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/main.ts
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-12-30 22:12:33 +0000
committerAleksey Kladov <[email protected]>2019-12-30 22:17:56 +0000
commit233f1dd2a850a7c8c6947c88c1ce06f7a945befd (patch)
tree0e6c920b9bb1955de444dc360072b2256060d89b /editors/code/src/main.ts
parentcdd7118cbf23e21c376092b3b2734407004b8dbf (diff)
Privatize highlighting
Diffstat (limited to 'editors/code/src/main.ts')
-rw-r--r--editors/code/src/main.ts9
1 files changed, 2 insertions, 7 deletions
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 345ae0685..20a3ea119 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -4,7 +4,6 @@ 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 notifications from './notifications';
8import { Server } from './server'; 7import { Server } from './server';
9import { Ctx } from './ctx'; 8import { Ctx } from './ctx';
10import { activateHighlighting } from './highlighting'; 9import { activateHighlighting } from './highlighting';
@@ -35,15 +34,9 @@ export async function activate(context: vscode.ExtensionContext) {
35 const watchStatus = new StatusDisplay(ctx.config.cargoWatchOptions.command); 34 const watchStatus = new StatusDisplay(ctx.config.cargoWatchOptions.command);
36 ctx.pushCleanup(watchStatus); 35 ctx.pushCleanup(watchStatus);
37 36
38 activateHighlighting(ctx);
39
40 // Notifications are events triggered by the language server 37 // Notifications are events triggered by the language server
41 const allNotifications: [string, lc.GenericNotificationHandler][] = [ 38 const allNotifications: [string, lc.GenericNotificationHandler][] = [
42 [ 39 [
43 'rust-analyzer/publishDecorations',
44 notifications.publishDecorations.handle,
45 ],
46 [
47 '$/progress', 40 '$/progress',
48 params => watchStatus.handleProgressNotification(params), 41 params => watchStatus.handleProgressNotification(params),
49 ], 42 ],
@@ -61,6 +54,8 @@ export async function activate(context: vscode.ExtensionContext) {
61 vscode.window.showErrorMessage(e.message); 54 vscode.window.showErrorMessage(e.message);
62 } 55 }
63 56
57 activateHighlighting(ctx);
58
64 if (ctx.config.displayInlayHints) { 59 if (ctx.config.displayInlayHints) {
65 activateInlayHints(ctx); 60 activateInlayHints(ctx);
66 } 61 }