Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix snippet completion will be trigger, when certain symbols are pressed (#21578)
tims9487fffc55f4
diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rsindex c20282fa028..bb4a2788a75 100644--- a/crates/editor/src/editor.rs+++ b/crates/editor/src/editor.rs@@ -13873,6 +13873,11 @@ fn snippet_completions(.take_while(|c| classifier.is_word(*c)).collect::<String>();last_word = last_word.chars().rev().collect();++ if last_word.is_empty() {+ return Ok(vec![]);+ }+let as_offset = text::ToOffset::to_offset(&buffer_position, &snapshot);let to_lsp = |point: &text::Anchor| {let end = text::ToPointUtf16::to_point_utf16(point, &snapshot);