diff options
author | Aleksey Kladov <[email protected]> | 2021-01-17 10:18:45 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-01-17 10:18:45 +0000 |
commit | 0a570eddd215902a65978c9d3736a2ffd4bdeaf8 (patch) | |
tree | f90425bdabec287ef347d95dbe6a500b376f37cc /crates/completion/src | |
parent | 44a995dd43b5789cdf14c2a8ab879f8d034ccba0 (diff) |
Less annoying `mod` completion
We shouldn't complete optional elements, as deleting stuff is much more
annoying than adding it.
Diffstat (limited to 'crates/completion/src')
-rw-r--r-- | crates/completion/src/completions/keyword.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 | |||
99 | add_keyword(ctx, acc, "else if", "else if $0 {}"); | 99 | add_keyword(ctx, acc, "else if", "else if $0 {}"); |
100 | } | 100 | } |
101 | if (ctx.has_item_list_or_source_file_parent) || ctx.block_expr_parent { | 101 | if (ctx.has_item_list_or_source_file_parent) || ctx.block_expr_parent { |
102 | add_keyword(ctx, acc, "mod", "mod $0 {}"); | 102 | add_keyword(ctx, acc, "mod", "mod $0"); |
103 | } | 103 | } |
104 | if ctx.bind_pat_parent || ctx.ref_pat_parent { | 104 | if ctx.bind_pat_parent || ctx.ref_pat_parent { |
105 | add_keyword(ctx, acc, "mut", "mut "); | 105 | add_keyword(ctx, acc, "mut", "mut "); |