aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/completion/src/completions/unqualified_path.rs6
-rw-r--r--crates/completion/src/render.rs22
2 files changed, 25 insertions, 3 deletions
diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs
index fca8d3a72..362d31f25 100644
--- a/crates/completion/src/completions/unqualified_path.rs
+++ b/crates/completion/src/completions/unqualified_path.rs
@@ -747,7 +747,7 @@ impl My<|>
747 } 747 }
748 748
749 #[test] 749 #[test]
750 fn function_magic_completion() { 750 fn function_fuzzy_completion() {
751 check_edit( 751 check_edit(
752 "stdin", 752 "stdin",
753 r#" 753 r#"
@@ -772,7 +772,7 @@ fn main() {
772 } 772 }
773 773
774 #[test] 774 #[test]
775 fn macro_magic_completion() { 775 fn macro_fuzzy_completion() {
776 check_edit( 776 check_edit(
777 "macro_with_curlies!", 777 "macro_with_curlies!",
778 r#" 778 r#"
@@ -799,7 +799,7 @@ fn main() {
799 } 799 }
800 800
801 #[test] 801 #[test]
802 fn case_insensitive_magic_completion_works() { 802 fn struct_fuzzy_completion() {
803 check_edit( 803 check_edit(
804 "ThirdStruct", 804 "ThirdStruct",
805 r#" 805 r#"
diff --git a/crates/completion/src/render.rs b/crates/completion/src/render.rs
index 1fa02c375..5a4353846 100644
--- a/crates/completion/src/render.rs
+++ b/crates/completion/src/render.rs
@@ -426,6 +426,28 @@ fn main() { let _: m::Spam = S<|> }
426 kind: Module, 426 kind: Module,
427 }, 427 },
428 CompletionItem { 428 CompletionItem {
429 label: "m::Spam",
430 source_range: 75..76,
431 text_edit: TextEdit {
432 indels: [
433 Indel {
434 insert: "use m::Spam;",
435 delete: 0..0,
436 },
437 Indel {
438 insert: "\n\n",
439 delete: 0..0,
440 },
441 Indel {
442 insert: "Spam",
443 delete: 75..76,
444 },
445 ],
446 },
447 kind: Enum,
448 lookup: "Spam",
449 },
450 CompletionItem {
429 label: "m::Spam::Foo", 451 label: "m::Spam::Foo",
430 source_range: 75..76, 452 source_range: 75..76,
431 delete: 75..76, 453 delete: 75..76,