From 0a570eddd215902a65978c9d3736a2ffd4bdeaf8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 17 Jan 2021 13:18:45 +0300 Subject: Less annoying `mod` completion We shouldn't complete optional elements, as deleting stuff is much more annoying than adding it. --- crates/completion/src/completions/keyword.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/completion/src/completions/keyword.rs b/crates/completion/src/completions/keyword.rs index c1af348dc..47e146128 100644 --- a/crates/completion/src/completions/keyword.rs +++ b/crates/completion/src/completions/keyword.rs @@ -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 "); -- cgit v1.2.3