From f9884419040453a9ba7869db757bf23b82b705b3 Mon Sep 17 00:00:00 2001 From: Daniel McNab <36049421+DJMcNab@users.noreply.github.com> Date: Wed, 28 Nov 2018 18:39:33 +0000 Subject: Add tfn lookup and remove test prefix --- crates/ra_analysis/src/completion/mod.rs | 2 +- crates/ra_analysis/src/completion/reference_completion.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_analysis') diff --git a/crates/ra_analysis/src/completion/mod.rs b/crates/ra_analysis/src/completion/mod.rs index 839fae641..d7acca044 100644 --- a/crates/ra_analysis/src/completion/mod.rs +++ b/crates/ra_analysis/src/completion/mod.rs @@ -440,7 +440,7 @@ mod tests { <|> } ", - r##"[CompletionItem { label: "Test function", lookup: None, snippet: Some("#[test]\nfn test_${1:feature}() {\n$0\n}") }, + r##"[CompletionItem { label: "Test function", lookup: Some("tfn"), snippet: Some("#[test]\nfn ${1:feature}() {\n$0\n}") }, CompletionItem { label: "pub(crate)", lookup: None, snippet: Some("pub(crate) $0") }]"##, ); } diff --git a/crates/ra_analysis/src/completion/reference_completion.rs b/crates/ra_analysis/src/completion/reference_completion.rs index e8eb77440..870c27778 100644 --- a/crates/ra_analysis/src/completion/reference_completion.rs +++ b/crates/ra_analysis/src/completion/reference_completion.rs @@ -174,9 +174,9 @@ fn complete_path( fn complete_mod_item_snippets(acc: &mut Vec) { acc.push(CompletionItem { label: "Test function".to_string(), - lookup: None, + lookup: Some("tfn".to_string()), snippet: Some("#[test]\n\ - fn test_${1:feature}() {\n\ + fn ${1:feature}() {\n\ $0\n\ }".to_string()), }); -- cgit v1.2.3