use better label for &mut ref completion
This commit is contained in:
parent
10bf61b83b
commit
469301b603
@ -32,7 +32,7 @@ pub(super) fn complete_postfix(acc: &mut Completions, ctx: &CompletionContext) {
|
||||
let receiver_text = dot_receiver.syntax().text().to_string();
|
||||
postfix_snippet(ctx, "not", "!expr", &format!("!{}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(ctx, "ref", "&expr", &format!("&{}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(ctx, "mref", "&mut expr", &format!("&mut {}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(ctx, "refm", "&mut expr", &format!("&mut {}", receiver_text)).add_to(acc);
|
||||
postfix_snippet(ctx, "if", "if expr {}", &format!("if {} {{$0}}", receiver_text))
|
||||
.add_to(acc);
|
||||
postfix_snippet(
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
created: "2019-02-14T17:38:20.322102467Z"
|
||||
created: "2019-02-14T18:33:26.102469493Z"
|
||||
creator: insta@0.6.2
|
||||
source: crates/ra_ide_api/src/completion/completion_item.rs
|
||||
expression: kind_completions
|
||||
@ -80,31 +80,6 @@ expression: kind_completions
|
||||
}
|
||||
)
|
||||
},
|
||||
CompletionItem {
|
||||
completion_kind: Postfix,
|
||||
label: "mref",
|
||||
kind: None,
|
||||
detail: Some(
|
||||
"&mut expr"
|
||||
),
|
||||
documentation: None,
|
||||
lookup: None,
|
||||
insert_text: Some(
|
||||
"&mut bar"
|
||||
),
|
||||
insert_text_format: Snippet,
|
||||
source_range: [76; 76),
|
||||
text_edit: Some(
|
||||
TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [72; 76),
|
||||
insert: ""
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
},
|
||||
CompletionItem {
|
||||
completion_kind: Postfix,
|
||||
label: "not",
|
||||
@ -155,6 +130,31 @@ expression: kind_completions
|
||||
}
|
||||
)
|
||||
},
|
||||
CompletionItem {
|
||||
completion_kind: Postfix,
|
||||
label: "refm",
|
||||
kind: None,
|
||||
detail: Some(
|
||||
"&mut expr"
|
||||
),
|
||||
documentation: None,
|
||||
lookup: None,
|
||||
insert_text: Some(
|
||||
"&mut bar"
|
||||
),
|
||||
insert_text_format: Snippet,
|
||||
source_range: [76; 76),
|
||||
text_edit: Some(
|
||||
TextEdit {
|
||||
atoms: [
|
||||
AtomTextEdit {
|
||||
delete: [72; 76),
|
||||
insert: ""
|
||||
}
|
||||
]
|
||||
}
|
||||
)
|
||||
},
|
||||
CompletionItem {
|
||||
completion_kind: Postfix,
|
||||
label: "while",
|
||||
|
Loading…
x
Reference in New Issue
Block a user