Skip to content

Commit

Permalink
Merge pull request #62 from hexedtech/chore/tweaks
Browse files Browse the repository at this point in the history
chore: lua annotations, cargo fmt
  • Loading branch information
alemidev authored Oct 27, 2024
2 parents 2ecf8e3 + 1039168 commit adb9c1c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
6 changes: 0 additions & 6 deletions dist/lua/annotations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions src/ffi/js/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ impl BufferController {

/// Acknowledge TextChange
#[napi(js_name = "ack")]
pub fn js_ack(&self, version: Vec<i64>){
pub fn js_ack(&self, version: Vec<i64>) {
self.ack(version);
}


/// Remove registered buffer callback
#[napi(js_name = "clearCallback")]
pub fn js_clear_callback(&self) {
Expand Down
2 changes: 1 addition & 1 deletion src/ffi/js/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down

0 comments on commit adb9c1c

Please sign in to comment.