mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
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:
parent
44a995dd43
commit
0a570eddd2
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ pub(crate) fn complete_expr_keyword(acc: &mut Completions, ctx: &CompletionConte
|
||||||
add_keyword(ctx, acc, "else if", "else if $0 {}");
|
add_keyword(ctx, acc, "else if", "else if $0 {}");
|
||||||
}
|
}
|
||||||
if (ctx.has_item_list_or_source_file_parent) || ctx.block_expr_parent {
|
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 {
|
if ctx.bind_pat_parent || ctx.ref_pat_parent {
|
||||||
add_keyword(ctx, acc, "mut", "mut ");
|
add_keyword(ctx, acc, "mut", "mut ");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue