diff --git a/crates/editor/src/editor.rs b/crates/editor/src/editor.rs index c20282fa028c24b3fd741af936dae061b51a362d..bb4a2788a7500c9295e954df8a8e2254aca54b64 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::(); 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);