aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/extension.ts
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r--editors/code/src/extension.ts28
1 files changed, 18 insertions, 10 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts
index 44e74f4cc..81e1107a0 100644
--- a/editors/code/src/extension.ts
+++ b/editors/code/src/extension.ts
@@ -23,26 +23,34 @@ export function activate(context: vscode.ExtensionContext) {
23 registerCommand('ra-lsp.joinLines', commands.joinLines.handle); 23 registerCommand('ra-lsp.joinLines', commands.joinLines.handle);
24 registerCommand('ra-lsp.parentModule', commands.parentModule.handle); 24 registerCommand('ra-lsp.parentModule', commands.parentModule.handle);
25 registerCommand('ra-lsp.run', commands.runnables.handle); 25 registerCommand('ra-lsp.run', commands.runnables.handle);
26 registerCommand('ra-lsp.applySourceChange', commands.applySourceChange.handle); 26 registerCommand(
27 'ra-lsp.applySourceChange',
28 commands.applySourceChange.handle
29 );
27 30
28 // Notifications are events triggered by the language server 31 // Notifications are events triggered by the language server
29 const allNotifications: Iterable<[string, lc.GenericNotificationHandler]> = [ 32 const allNotifications: Iterable<
30 ['m/publishDecorations', notifications.publishDecorations.handle], 33 [string, lc.GenericNotificationHandler]
31 ]; 34 > = [['m/publishDecorations', notifications.publishDecorations.handle]];
32 35
33 // The events below are plain old javascript events, triggered and handled by vscode 36 // The events below are plain old javascript events, triggered and handled by vscode
34 vscode.window.onDidChangeActiveTextEditor(events.changeActiveTextEditor.handle); 37 vscode.window.onDidChangeActiveTextEditor(
38 events.changeActiveTextEditor.handle
39 );
35 40
36 const textDocumentContentProvider = new TextDocumentContentProvider(); 41 const textDocumentContentProvider = new TextDocumentContentProvider();
37 disposeOnDeactivation(vscode.workspace.registerTextDocumentContentProvider( 42 disposeOnDeactivation(
38 'ra-lsp', 43 vscode.workspace.registerTextDocumentContentProvider(
39 textDocumentContentProvider, 44 'ra-lsp',
40 )); 45 textDocumentContentProvider
46 )
47 );
41 48
42 vscode.workspace.onDidChangeTextDocument( 49 vscode.workspace.onDidChangeTextDocument(
43 events.changeTextDocument.createHandler(textDocumentContentProvider), 50 events.changeTextDocument.createHandler(textDocumentContentProvider),
44 null, 51 null,
45 context.subscriptions); 52 context.subscriptions
53 );
46 54
47 // Start the language server, finally! 55 // Start the language server, finally!
48 Server.start(allNotifications); 56 Server.start(allNotifications);