add function to completion ctx

This commit is contained in:
Aleksey Kladov 2018-12-27 17:33:52 +03:00
parent 7a1ed6400d
commit e4de2c8d7f
6 changed files with 19 additions and 21 deletions

View file

@ -7,7 +7,7 @@ fn snippet(label: &str, snippet: &str) -> Builder {
}
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) {
if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) {
return;
}
snippet("pd", "eprintln!(\"$0 = {:?}\", $0);").add_to(acc);