mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 15:34:49 +01:00
chore: auto format code
This commit is contained in:
parent
d7736c0add
commit
3f5f72fbfb
6 changed files with 58 additions and 64 deletions
|
@ -2,7 +2,6 @@
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as codemp from 'codemp';
|
import * as codemp from 'codemp';
|
||||||
import * as mapping from "../mapping";
|
import * as mapping from "../mapping";
|
||||||
import {client} from "./client"
|
|
||||||
import { workspace } from "./workspaces";
|
import { workspace } from "./workspaces";
|
||||||
import { LOGGER, provider } from '../extension';
|
import { LOGGER, provider } from '../extension';
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,6 @@ import {workspace,setWorkspace} from "./workspaces";
|
||||||
import { LOGGER, provider } from '../extension';
|
import { LOGGER, provider } from '../extension';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO this "global state" should probably live elsewher but we need lo update it from these commands
|
// TODO this "global state" should probably live elsewher but we need lo update it from these commands
|
||||||
export let client: codemp.Client | null = null;
|
export let client: codemp.Client | null = null;
|
||||||
export let workspace_list: string[] = [];
|
export let workspace_list: string[] = [];
|
||||||
|
|
|
@ -30,7 +30,8 @@ export async function jump(selected: vscode.TreeItem | undefined){
|
||||||
if (user_hl === undefined) return vscode.window.showWarningMessage("unknown position of such user");
|
if (user_hl === undefined) return vscode.window.showWarningMessage("unknown position of such user");
|
||||||
let uri = mapping.bufferMapper.uri_by_buffer(user_hl.buffer);
|
let uri = mapping.bufferMapper.uri_by_buffer(user_hl.buffer);
|
||||||
if (uri === undefined) {
|
if (uri === undefined) {
|
||||||
return vscode.window.showWarningMessage("user is on an untracked buffer: "+ user_hl.buffer);}
|
return vscode.window.showWarningMessage("user is on an untracked buffer: " + user_hl.buffer);
|
||||||
|
}
|
||||||
let editor = await vscode.window.showTextDocument(uri, { preserveFocus: false });
|
let editor = await vscode.window.showTextDocument(uri, { preserveFocus: false });
|
||||||
let range_start: vscode.Position = new vscode.Position(user_hl.startRow, user_hl.startCol);
|
let range_start: vscode.Position = new vscode.Position(user_hl.startRow, user_hl.startCol);
|
||||||
let range_end: vscode.Position = new vscode.Position(user_hl.endRow, user_hl.endCol);
|
let range_end: vscode.Position = new vscode.Position(user_hl.endRow, user_hl.endCol);
|
||||||
|
@ -39,8 +40,6 @@ export async function jump(selected: vscode.TreeItem | undefined){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export async function createBuffer() {
|
export async function createBuffer() {
|
||||||
let bufferName: any = (await vscode.window.showInputBox({ prompt: "path of the buffer to create" }));
|
let bufferName: any = (await vscode.window.showInputBox({ prompt: "path of the buffer to create" }));
|
||||||
if (workspace === null) return vscode.window.showWarningMessage("Join a workspace first");
|
if (workspace === null) return vscode.window.showWarningMessage("Join a workspace first");
|
||||||
|
|
|
@ -62,4 +62,3 @@ async function log_poller_task(logger: codemp.JsLogger) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ export class CodempTreeProvider implements vscode.TreeDataProvider<CodempTreeIte
|
||||||
);
|
);
|
||||||
} else return [];
|
} else return [];
|
||||||
|
|
||||||
case Type.UserList:
|
case Type.UserList: // asdasd
|
||||||
let out = [];
|
let out = [];
|
||||||
for (let x of colors_cache) {
|
for (let x of colors_cache) {
|
||||||
out.push(new CodempTreeItem(x[0], Type.User, { description: x[1].buffer }));
|
out.push(new CodempTreeItem(x[0], Type.User, { description: x[1].buffer }));
|
||||||
|
|
Loading…
Reference in a new issue