2023-07-02 23:58:06 +02:00
|
|
|
const vscode = require("vscode");
|
2023-07-03 01:38:09 +02:00
|
|
|
const codemp = require("./codemp.node");
|
2023-07-02 23:58:06 +02:00
|
|
|
|
2023-07-03 01:38:09 +02:00
|
|
|
var CLIENT = null
|
2023-07-02 23:58:06 +02:00
|
|
|
|
2023-07-03 01:38:09 +02:00
|
|
|
async function activate(context) {
|
2023-07-02 23:58:06 +02:00
|
|
|
// This must match the command property in the package.json
|
|
|
|
const commandID = "codemp.connect";
|
2023-07-03 01:38:09 +02:00
|
|
|
let disposable = vscode.commands.registerCommand(commandID, connect);
|
2023-07-02 23:58:06 +02:00
|
|
|
context.subscriptions.push(disposable);
|
|
|
|
}
|
|
|
|
|
2023-07-03 01:38:09 +02:00
|
|
|
async function connect() {
|
|
|
|
CLIENT = await codemp.connect("http://fantabos.co:50051")
|
|
|
|
vscode.window.showInformationMessage("Connected to CodeMP!");
|
2023-07-02 23:58:06 +02:00
|
|
|
}
|
|
|
|
|
2023-07-03 01:38:09 +02:00
|
|
|
module.exports = {
|
|
|
|
activate,
|
|
|
|
}
|