New features: creating buffers

This commit is contained in:
frelodev 2023-10-01 10:51:28 +02:00
parent 9e2d372e5e
commit ed859f0630
2 changed files with 13 additions and 3 deletions

View file

@ -23,6 +23,10 @@
"command": "codempvscode.join",
"title": "Join a codemp workspace"
},
{
"command": "codempvscode.createBuffer",
"title": "create a codemp buffer"
},
{
"command": "codempvscode.helloWorld",
"title": "Hello World (debug)"

View file

@ -27,8 +27,10 @@ export function activate(context: vscode.ExtensionContext) {
});
let connectCommand = vscode.commands.registerCommand('codempvscode.connect', connect);
let joinCommand = vscode.commands.registerCommand('codempvscode.join', join);
let createBufferCommand = vscode.commands.registerCommand('codempvscode.createBuffer', createBuffer);
context.subscriptions.push(connectCommand);
context.subscriptions.push(joinCommand);
context.subscriptions.push(createBufferCommand);
context.subscriptions.push(disposable);
}
@ -114,9 +116,13 @@ async function join() {
}
async function createBuffer(){
let buffer : string = (await vscode.window.showInputBox({prompt: "path of the buffer to create"}))!;
console.log("new buffer created ", buffer, "\n");
codemp.create(buffer);
console.log("new createdBuffer ", createBuffer, "\n");
//TODO push all the current opened file onto the buffer
}