Display snippet in the completion label

This commit is contained in:
Kirill Bulatov 2020-08-11 22:33:17 +03:00
parent e0de247520
commit 7543b06d30

View file

@ -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)
"#]], "#]],
) )
} }