mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Merge #250
250: Improve the suggestion for test functions r=DJMcNab a=DJMcNab I haven't fully updated the previous commented out test - I don't know why it was commented out so some clarification would be welcome. Co-authored-by: Daniel McNab <36049421+djmcnab@users.noreply.github.com> Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
This commit is contained in:
commit
244f9a142f
2 changed files with 11 additions and 5 deletions
|
@ -177,9 +177,15 @@ fn complete_path(
|
|||
|
||||
fn complete_mod_item_snippets(acc: &mut Vec<CompletionItem>) {
|
||||
acc.push(CompletionItem {
|
||||
label: "tfn".to_string(),
|
||||
lookup: None,
|
||||
snippet: Some("#[test]\nfn $1() {\n $0\n}".to_string()),
|
||||
label: "Test function".to_string(),
|
||||
lookup: Some("tfn".to_string()),
|
||||
snippet: Some(
|
||||
"#[test]\n\
|
||||
fn ${1:feature}() {\n\
|
||||
$0\n\
|
||||
}"
|
||||
.to_string(),
|
||||
),
|
||||
});
|
||||
acc.push(CompletionItem {
|
||||
label: "pub(crate)".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue