diff options
Diffstat (limited to 'editors/code/src/extension.ts')
-rw-r--r-- | editors/code/src/extension.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/editors/code/src/extension.ts b/editors/code/src/extension.ts index 595fb98fe..f1bc0b457 100644 --- a/editors/code/src/extension.ts +++ b/editors/code/src/extension.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import * as vscode from 'vscode'; | 1 | import * as vscode from 'vscode'; |
2 | 2 | ||
3 | import * as commands from './commands' | 3 | import * as commands from './commands'; |
4 | import * as events from './events' | ||
5 | import { Server } from './server'; | ||
6 | import { TextDocumentContentProvider } from './commands/syntaxTree'; | 4 | import { TextDocumentContentProvider } from './commands/syntaxTree'; |
5 | import * as events from './events'; | ||
6 | import { Server } from './server'; | ||
7 | 7 | ||
8 | export function activate(context: vscode.ExtensionContext) { | 8 | export function activate(context: vscode.ExtensionContext) { |
9 | function disposeOnDeactivation(disposable: vscode.Disposable) { | 9 | function disposeOnDeactivation(disposable: vscode.Disposable) { |
@@ -11,10 +11,10 @@ export function activate(context: vscode.ExtensionContext) { | |||
11 | } | 11 | } |
12 | 12 | ||
13 | function registerCommand(name: string, f: any) { | 13 | function registerCommand(name: string, f: any) { |
14 | disposeOnDeactivation(vscode.commands.registerCommand(name, f)) | 14 | disposeOnDeactivation(vscode.commands.registerCommand(name, f)); |
15 | } | 15 | } |
16 | 16 | ||
17 | registerCommand('ra-lsp.syntaxTree', commands.syntaxTree.handle) | 17 | registerCommand('ra-lsp.syntaxTree', commands.syntaxTree.handle); |
18 | registerCommand('ra-lsp.extendSelection', commands.extendSelection.handle); | 18 | registerCommand('ra-lsp.extendSelection', commands.extendSelection.handle); |
19 | registerCommand('ra-lsp.matchingBrace', commands.matchingBrace.handle); | 19 | registerCommand('ra-lsp.matchingBrace', commands.matchingBrace.handle); |
20 | registerCommand('ra-lsp.joinLines', commands.joinLines.handle); | 20 | registerCommand('ra-lsp.joinLines', commands.joinLines.handle); |
@@ -22,19 +22,19 @@ export function activate(context: vscode.ExtensionContext) { | |||
22 | registerCommand('ra-lsp.run', commands.runnables.handle); | 22 | registerCommand('ra-lsp.run', commands.runnables.handle); |
23 | registerCommand('ra-lsp.applySourceChange', commands.applySourceChange.handle); | 23 | registerCommand('ra-lsp.applySourceChange', commands.applySourceChange.handle); |
24 | 24 | ||
25 | let textDocumentContentProvider = new TextDocumentContentProvider() | 25 | const textDocumentContentProvider = new TextDocumentContentProvider(); |
26 | disposeOnDeactivation(vscode.workspace.registerTextDocumentContentProvider( | 26 | disposeOnDeactivation(vscode.workspace.registerTextDocumentContentProvider( |
27 | 'ra-lsp', | 27 | 'ra-lsp', |
28 | textDocumentContentProvider | 28 | textDocumentContentProvider, |
29 | )) | 29 | )); |
30 | 30 | ||
31 | Server.start() | 31 | Server.start(); |
32 | 32 | ||
33 | vscode.workspace.onDidChangeTextDocument( | 33 | vscode.workspace.onDidChangeTextDocument( |
34 | events.changeTextDocument.createHandler(textDocumentContentProvider), | 34 | events.changeTextDocument.createHandler(textDocumentContentProvider), |
35 | null, | 35 | null, |
36 | context.subscriptions) | 36 | context.subscriptions); |
37 | vscode.window.onDidChangeActiveTextEditor(events.changeActiveTextEditor.handle) | 37 | vscode.window.onDidChangeActiveTextEditor(events.changeActiveTextEditor.handle); |
38 | } | 38 | } |
39 | 39 | ||
40 | export function deactivate(): Thenable<void> { | 40 | export function deactivate(): Thenable<void> { |