From 272cd1604e6059496bbb47988dc661ec1b85f465 Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Sat, 22 Jun 2019 09:13:47 -0700 Subject: [PATCH 1/2] Adding Live Share support --- package.json | 6 +++--- src/extension.js | 14 +++++++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 16b6daa..6e68c8b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.9.8", "publisher": "zjhmale", "engines": { - "vscode": "^1.8.0" + "vscode": "^1.30.0" }, "icon": "images/idris.png", "keywords": [ @@ -422,6 +422,6 @@ }, "devDependencies": { "eslint": "^3.19.0", - "vscode": "^1.0.5" + "vscode": "^1.1.34" } -} \ No newline at end of file +} diff --git a/src/extension.js b/src/extension.js index 223b0ec..a779780 100644 --- a/src/extension.js +++ b/src/extension.js @@ -28,13 +28,21 @@ function activate(context) { } }) - context.subscriptions.push(controller.tcDiagnosticCollection) - context.subscriptions.push(controller.buildDiagnosticCollection) - context.subscriptions.push(controller.nonTotalDiagnosticCollection) controller.getCommands().forEach(([key, value]) => { let disposable = vscode.commands.registerCommand(key, value) context.subscriptions.push(disposable) }) + + // If the end-user is joined into a Live Share session, then there's no need + // to register any of the language services or document event handlers. + if (vscode.workspace.workspaceFolders.find((folder) => folder.uri.scheme === "vsls")) { + return; + } + + context.subscriptions.push(controller.tcDiagnosticCollection) + context.subscriptions.push(controller.buildDiagnosticCollection) + context.subscriptions.push(controller.nonTotalDiagnosticCollection) + context.subscriptions.push(vscode.languages.registerCompletionItemProvider(controller.IDRIS_MODE, new idrisCompletion.IdrisCompletionProvider(), ...triggers)) context.subscriptions.push(vscode.languages.registerHoverProvider(controller.IDRIS_MODE, new idrisHover.IdrisHoverProvider())) context.subscriptions.push(vscode.languages.registerDefinitionProvider(controller.IDRIS_MODE, new idrisDefinition.IdrisDefinitionProvider())) From 013812a8094fb79ed7684ae2805070be56a2a2b7 Mon Sep 17 00:00:00 2001 From: Jonathan Carter Date: Sat, 22 Jun 2019 09:49:42 -0700 Subject: [PATCH 2/2] Updating VS Code engine version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6e68c8b..4cdbfc3 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "version": "0.9.8", "publisher": "zjhmale", "engines": { - "vscode": "^1.30.0" + "vscode": "^1.31.0" }, "icon": "images/idris.png", "keywords": [