@@ -3950,7 +3950,6 @@ pub fn completion(cx: &mut Context) {
39503950 iter.reverse();
39513951 let offset = iter.take_while(|ch| chars::char_is_word(*ch)).count();
39523952 let start_offset = cursor.saturating_sub(offset);
3953− let prefix = text.slice(start_offset..cursor).to_string();
39543953
39553954 cx.callback(
39563955 future,
@@ -3960,7 +3959,7 @@ pub fn completion(cx: &mut Context) {
39603959 return;
39613960 }
39623961
3963− let mut items = match response {
3962+ let items = match response {
39643963 Some(lsp::CompletionResponse::Array(items)) => items,
39653964 // TODO: do something with is_incomplete
39663965 Some(lsp::CompletionResponse::List(lsp::CompletionList {
@@ -3970,15 +3969,6 @@ pub fn completion(cx: &mut Context) {
39703969 None => Vec::new(),
39713970 };
39723971
3973− if !prefix.is_empty() {
3974− items.retain(|item| {
3975− item.filter_text
3976− .as_ref()
3977− .unwrap_or(&item.label)
3978− .starts_with(&prefix)
3979− });
3980− }
3981−
39823972 if items.is_empty() {
39833973 // editor.set_error("No completion available");
39843974 return;