fix: add for keyword in completion #7588

This commit is contained in:
Gowri 2021-02-08 09:57:16 +10:30
parent 336909b63a
commit 7b92a55ff7

View File

@ -88,6 +88,7 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte
add_keyword(ctx, acc, "loop", "loop {$0}");
add_keyword(ctx, acc, "if", "if $0 {}");
add_keyword(ctx, acc, "if let", "if let $1 = $0 {}");
add_keyword(ctx, acc, "for", "for $0 in $1 {}");
}
if ctx.if_is_prev || ctx.block_expr_parent {