Less annoying mod completion

We shouldn't complete optional elements, as deleting stuff is much more
annoying than adding it.
This commit is contained in:
Aleksey Kladov 2021-01-17 13:18:45 +03:00
parent 44a995dd43
commit 0a570eddd2

View File

@ -99,7 +99,7 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte
add_keyword(ctx, acc, "else if", "else if $0 {}");
}
if (ctx.has_item_list_or_source_file_parent) || ctx.block_expr_parent {
add_keyword(ctx, acc, "mod", "mod $0 {}");
add_keyword(ctx, acc, "mod", "mod $0");
}
if ctx.bind_pat_parent || ctx.ref_pat_parent {
add_keyword(ctx, acc, "mut", "mut ");