From 71b9f06c89735b78439d0720e314b71969c17eb3 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 23 Jan 2019 16:21:20 +0300 Subject: don't insert parens for self methods --- ...n_item__inserts_parens_for_function_calls3.snap | 26 ++++++++++++++++++++++ .../completion_item__method_completion.snap | 8 +++---- ...on_item__struct_field_completion_autoderef.snap | 8 +++---- ...pletion_item__struct_field_completion_self.snap | 8 +++---- 4 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap (limited to 'crates/ra_ide_api/src/completion/snapshots') diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap new file mode 100644 index 000000000..92068e50a --- /dev/null +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__inserts_parens_for_function_calls3.snap @@ -0,0 +1,26 @@ +--- +created: "2019-01-23T13:19:23.525922020+00:00" +creator: insta@0.5.2 +expression: kind_completions +source: crates/ra_ide_api/src/completion/completion_item.rs +--- +[ + CompletionItem { + completion_kind: Reference, + label: "foo", + kind: Some( + Method + ), + detail: Some( + "fn foo(&self)" + ), + documentation: None, + lookup: None, + insert_text: Some( + "foo()$0" + ), + insert_text_format: Snippet, + source_range: [139; 140), + text_edit: None + } +] diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap index ffeac0bf4..10fe59248 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__method_completion.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-22T15:38:19.541947400+00:00" -creator: insta@0.4.0 +created: "2019-01-23T13:19:23.501258181+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { @@ -17,7 +17,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "the_method($0)" + "the_method()$0" ), insert_text_format: Snippet, source_range: [144; 144), diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap index 5ef140b28..5f5df0033 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_autoderef.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-22T15:38:19.541947400+00:00" -creator: insta@0.4.0 +created: "2019-01-23T13:19:23.501353210+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { @@ -33,7 +33,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "foo($0)" + "foo()$0" ), insert_text_format: Snippet, source_range: [126; 126), diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap index b7903c5bc..80e8f3df5 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__struct_field_completion_self.snap @@ -1,8 +1,8 @@ --- -created: "2019-01-22T15:38:19.541947400+00:00" -creator: insta@0.4.0 +created: "2019-01-23T13:19:23.501297515+00:00" +creator: insta@0.5.2 expression: kind_completions -source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" +source: crates/ra_ide_api/src/completion/completion_item.rs --- [ CompletionItem { @@ -33,7 +33,7 @@ source: "crates\\ra_ide_api\\src\\completion\\completion_item.rs" documentation: None, lookup: None, insert_text: Some( - "foo($0)" + "foo()$0" ), insert_text_format: Snippet, source_range: [121; 121), -- cgit v1.2.3