diff --git a/xxx/stamp.rs index 3631a91..87ebc60 100644 --- a/xxx/stamp.rs +++ b/xxx/stamp.rs @@ -1,4 +1,5 @@ use std::fmt::Display; +use std::sync::{Arc, Mutex}; use async_lsp::lsp_types::Position; use ropey::{Rope, RopeSlice}; @@ -98,7 +99,7 @@ impl<'a> Stamp<'a> { info!( eol = stamp.is_eol, new_line = stamp.is_new_line, - signle_line = stamp.node_is_single_line, + single_line = stamp.node_is_single_line, node = node.kind(), should_close = stamp.should_close_with.map(|c| c.to_string()), child = node.named_child_count(), @@ -266,7 +267,7 @@ impl<'a> Stamp<'a> { CompletionTrend { pos: self.pos, result: CompletionType::Discard, - stamp: self, + stamp: Arc::new(Mutex::new(self)), reason, stop: None, } @@ -276,7 +277,7 @@ impl<'a> Stamp<'a> { CompletionTrend { pos: self.pos, result: CompletionType::SingleLine, - stamp: self, + stamp: Arc::new(Mutex::new(self)), reason, stop: None, } @@ -286,7 +287,7 @@ impl<'a> Stamp<'a> { CompletionTrend { pos: self.pos, result: CompletionType::MultiLine, - stamp: self, + stamp: Arc::new(Mutex::new(self)), reason, stop: None, } @@ -669,6 +670,3 @@ func demo(i int) int { } } } - -