From 1039168789e7e7db049fb776f7c45bc84cd05db9 Mon Sep 17 00:00:00 2001 From: alemi Date: Sun, 27 Oct 2024 19:42:14 +0100 Subject: [PATCH] chore: lua annotations, cargo fmt --- dist/lua/annotations.lua | 6 ------ src/ffi/js/buffer.rs | 3 +-- src/ffi/js/workspace.rs | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/dist/lua/annotations.lua b/dist/lua/annotations.lua index 5f91405..1b638e1 100644 --- a/dist/lua/annotations.lua +++ b/dist/lua/annotations.lua @@ -377,9 +377,6 @@ local BufferUpdate = {} function TextChange:apply(other) end ---@param change TextChange text change to broadcast ----@return NilPromise ----@async ----@nodiscard ---update buffer with a text change; note that to delete content should be empty but not span, while to insert span should be empty but not content (can insert and delete at the same time) function BufferController:send(change) end @@ -438,9 +435,6 @@ local CursorController = {} ---@field sel Selection selected region for this user ---@param cursor Selection cursor position to broadcast ----@return NilPromise ----@async ----@nodiscard ---update cursor position by sending a cursor event to server function CursorController:send(cursor) end diff --git a/src/ffi/js/buffer.rs b/src/ffi/js/buffer.rs index 67c1005..79f1071 100644 --- a/src/ffi/js/buffer.rs +++ b/src/ffi/js/buffer.rs @@ -33,11 +33,10 @@ impl BufferController { /// Acknowledge TextChange #[napi(js_name = "ack")] - pub fn js_ack(&self, version: Vec){ + pub fn js_ack(&self, version: Vec) { self.ack(version); } - /// Remove registered buffer callback #[napi(js_name = "clearCallback")] pub fn js_clear_callback(&self) { diff --git a/src/ffi/js/workspace.rs b/src/ffi/js/workspace.rs index d1ba78d..e862322 100644 --- a/src/ffi/js/workspace.rs +++ b/src/ffi/js/workspace.rs @@ -121,7 +121,7 @@ impl Workspace { })?; self.callback(move |controller: Workspace| { tsfn.call(controller.clone(), ThreadsafeFunctionCallMode::Blocking); //check this with tracing also we could use Ok(event) to get the error - // If it blocks the main thread too many time we have to change this + // If it blocks the main thread too many time we have to change this }); Ok(())