Add tfn lookup and remove test prefix

This commit is contained in:
Daniel McNab 2018-11-28 18:39:33 +00:00
parent b47a88be9c
commit f988441904
2 changed files with 3 additions and 3 deletions

View file

@ -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") }]"##, CompletionItem { label: "pub(crate)", lookup: None, snippet: Some("pub(crate) $0") }]"##,
); );
} }

View file

@ -174,9 +174,9 @@ fn complete_path(
fn complete_mod_item_snippets(acc: &mut Vec<CompletionItem>) { fn complete_mod_item_snippets(acc: &mut Vec<CompletionItem>) {
acc.push(CompletionItem { acc.push(CompletionItem {
label: "Test function".to_string(), label: "Test function".to_string(),
lookup: None, lookup: Some("tfn".to_string()),
snippet: Some("#[test]\n\ snippet: Some("#[test]\n\
fn test_${1:feature}() {\n\ fn ${1:feature}() {\n\
$0\n\ $0\n\
}".to_string()), }".to_string()),
}); });