Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions clients/vscode/extension.affine
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// SPDX-License-Identifier: MPL-2.0
// Ported via Harvard Engine mechanical processor
// Ported via Harvard Engine (Semantic pass)

module extension;

// TODO: Complete semantic implementation

/* === ORIGINAL TYPESCRIPT CONTEXT ===
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
// Universal Language Connector - VS Code Client
Expand All @@ -21,7 +18,7 @@ import {

let client: LanguageClient;

export function activate(context: vscode.ExtensionContext) {
fn activate(context: vscode.ExtensionContext) {
// Server executable configuration
const serverOptions: ServerOptions = {
command: 'universal-connector-server',
Expand Down Expand Up @@ -53,7 +50,7 @@ export function activate(context: vscode.ExtensionContext) {
// Register commands
context.subscriptions.push(
vscode.commands.registerCommand('universalConnector.convertToHtml', async () => {
const editor = vscode.window.activeTextEditor;
let editor = vscode.window.activeTextEditor;
if (editor) {
await client.sendRequest('workspace/executeCommand', {
command: 'convert.toHtml',
Expand All @@ -65,7 +62,7 @@ export function activate(context: vscode.ExtensionContext) {

context.subscriptions.push(
vscode.commands.registerCommand('universalConnector.convertToMarkdown', async () => {
const editor = vscode.window.activeTextEditor;
let editor = vscode.window.activeTextEditor;
if (editor) {
await client.sendRequest('workspace/executeCommand', {
command: 'convert.toMarkdown',
Expand All @@ -77,7 +74,7 @@ export function activate(context: vscode.ExtensionContext) {

context.subscriptions.push(
vscode.commands.registerCommand('universalConnector.convertToJson', async () => {
const editor = vscode.window.activeTextEditor;
let editor = vscode.window.activeTextEditor;
if (editor) {
await client.sendRequest('workspace/executeCommand', {
command: 'convert.toJson',
Expand All @@ -91,11 +88,10 @@ export function activate(context: vscode.ExtensionContext) {
client.start();
}

export function deactivate(): Thenable<void> | undefined {
fn deactivate(): Thenable<void> | undefined {
if (!client) {
return undefined;
}
return client.stop();
}

==================================== */
Loading