mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-14 06:03:58 +00:00
Display snippet in the completion label
This commit is contained in:
parent
e0de247520
commit
7543b06d30
1 changed files with 4 additions and 4 deletions
|
@ -36,7 +36,7 @@ pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionConte
|
||||||
snippet(
|
snippet(
|
||||||
ctx,
|
ctx,
|
||||||
cap,
|
cap,
|
||||||
"Test module",
|
"tmod (Test module)",
|
||||||
"\
|
"\
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
@ -54,7 +54,7 @@ mod tests {
|
||||||
snippet(
|
snippet(
|
||||||
ctx,
|
ctx,
|
||||||
cap,
|
cap,
|
||||||
"Test function",
|
"tfn (Test function)",
|
||||||
"\
|
"\
|
||||||
#[test]
|
#[test]
|
||||||
fn ${1:feature}() {
|
fn ${1:feature}() {
|
||||||
|
@ -106,10 +106,10 @@ mod tests {
|
||||||
}
|
}
|
||||||
"#,
|
"#,
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
sn Test function
|
|
||||||
sn Test module
|
|
||||||
sn macro_rules
|
sn macro_rules
|
||||||
sn pub(crate)
|
sn pub(crate)
|
||||||
|
sn tfn (Test function)
|
||||||
|
sn tmod (Test module)
|
||||||
"#]],
|
"#]],
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue