aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel McNab <[email protected]>2018-11-28 18:39:33 +0000
committerDaniel McNab <[email protected]>2018-11-28 18:39:33 +0000
commitf9884419040453a9ba7869db757bf23b82b705b3 (patch)
treed865f3080b15476d71faf50b40973caa2bf42474
parentb47a88be9c2d486cc97c0e893f7b47d5d071f93b (diff)
Add tfn lookup and remove test prefix
-rw-r--r--crates/ra_analysis/src/completion/mod.rs2
-rw-r--r--crates/ra_analysis/src/completion/reference_completion.rs4
2 files changed, 3 insertions, 3 deletions
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 {
440 <|> 440 <|>
441 } 441 }
442 ", 442 ",
443 r##"[CompletionItem { label: "Test function", lookup: None, snippet: Some("#[test]\nfn test_${1:feature}() {\n$0\n}") }, 443 r##"[CompletionItem { label: "Test function", lookup: Some("tfn"), snippet: Some("#[test]\nfn ${1:feature}() {\n$0\n}") },
444 CompletionItem { label: "pub(crate)", lookup: None, snippet: Some("pub(crate) $0") }]"##, 444 CompletionItem { label: "pub(crate)", lookup: None, snippet: Some("pub(crate) $0") }]"##,
445 ); 445 );
446 } 446 }
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(
174fn complete_mod_item_snippets(acc: &mut Vec<CompletionItem>) { 174fn complete_mod_item_snippets(acc: &mut Vec<CompletionItem>) {
175 acc.push(CompletionItem { 175 acc.push(CompletionItem {
176 label: "Test function".to_string(), 176 label: "Test function".to_string(),
177 lookup: None, 177 lookup: Some("tfn".to_string()),
178 snippet: Some("#[test]\n\ 178 snippet: Some("#[test]\n\
179 fn test_${1:feature}() {\n\ 179 fn ${1:feature}() {\n\
180 $0\n\ 180 $0\n\
181 }".to_string()), 181 }".to_string()),
182 }); 182 });