From 92aa0f9c871a9308ea3db1b1c4b7e42d88348e30 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 12:05:16 +0300 Subject: Don't use additional_text_edits API internally --- .../completion_item__keywords_in_function2.snap | 86 ++++++++++++++++------ 1 file changed, 64 insertions(+), 22 deletions(-) (limited to 'crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap') diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap index fd63c1678..07e673852 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T07:29:59.630760038Z" +created: "2019-02-18T09:10:51.986894362Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,50 +8,92 @@ expression: kind_completions CompletionItem { label: "else", source_range: [92; 92), - kind: Keyword, - insert_text: "else {$0}", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "else {$0}" + } + ] + }, + kind: Keyword }, CompletionItem { label: "else if", source_range: [92; 92), - kind: Keyword, - insert_text: "else if $0 {}", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "else if $0 {}" + } + ] + }, + kind: Keyword }, CompletionItem { label: "if", source_range: [92; 92), - kind: Keyword, - insert_text: "if $0 {}", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "if $0 {}" + } + ] + }, + kind: Keyword }, CompletionItem { label: "loop", source_range: [92; 92), - kind: Keyword, - insert_text: "loop {$0}", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "loop {$0}" + } + ] + }, + kind: Keyword }, CompletionItem { label: "match", source_range: [92; 92), - kind: Keyword, - insert_text: "match $0 {}", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "match $0 {}" + } + ] + }, + kind: Keyword }, CompletionItem { label: "return", source_range: [92; 92), - kind: Keyword, - insert_text: "return;", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "return;" + } + ] + }, + kind: Keyword }, CompletionItem { label: "while", source_range: [92; 92), - kind: Keyword, - insert_text: "while $0 {}", - insert_text_format: Snippet + text_edit: TextEdit { + atoms: [ + AtomTextEdit { + delete: [92; 92), + insert: "while $0 {}" + } + ] + }, + kind: Keyword } ] -- cgit v1.2.3 From a92db7c84829becdf95e0a5ef6e27cdf833518b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 18 Feb 2019 12:23:31 +0300 Subject: more compact edits in insta --- .../completion_item__keywords_in_function2.snap | 72 +++++----------------- 1 file changed, 15 insertions(+), 57 deletions(-) (limited to 'crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap') diff --git a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap index 07e673852..b08efa522 100644 --- a/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap +++ b/crates/ra_ide_api/src/completion/snapshots/completion_item__keywords_in_function2.snap @@ -1,5 +1,5 @@ --- -created: "2019-02-18T09:10:51.986894362Z" +created: "2019-02-18T09:22:23.984740354Z" creator: insta@0.6.2 source: crates/ra_ide_api/src/completion/completion_item.rs expression: kind_completions @@ -8,92 +8,50 @@ expression: kind_completions CompletionItem { label: "else", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "else {$0}" - } - ] - }, + delete: [92; 92), + insert: "else {$0}", kind: Keyword }, CompletionItem { label: "else if", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "else if $0 {}" - } - ] - }, + delete: [92; 92), + insert: "else if $0 {}", kind: Keyword }, CompletionItem { label: "if", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "if $0 {}" - } - ] - }, + delete: [92; 92), + insert: "if $0 {}", kind: Keyword }, CompletionItem { label: "loop", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "loop {$0}" - } - ] - }, + delete: [92; 92), + insert: "loop {$0}", kind: Keyword }, CompletionItem { label: "match", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "match $0 {}" - } - ] - }, + delete: [92; 92), + insert: "match $0 {}", kind: Keyword }, CompletionItem { label: "return", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "return;" - } - ] - }, + delete: [92; 92), + insert: "return;", kind: Keyword }, CompletionItem { label: "while", source_range: [92; 92), - text_edit: TextEdit { - atoms: [ - AtomTextEdit { - delete: [92; 92), - insert: "while $0 {}" - } - ] - }, + delete: [92; 92), + insert: "while $0 {}", kind: Keyword } ] -- cgit v1.2.3