aboutsummaryrefslogtreecommitdiff
path: root/crates/completion
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-12-01 23:02:15 +0000
committerKirill Bulatov <[email protected]>2020-12-07 21:41:08 +0000
commit2a7be4afb000d97948bb7f11bcd074fc1e11716e (patch)
tree8d8e7dadaca7a24e4a40ab3976baf19876d6a7e0 /crates/completion
parent47464e556c160ce705c2e3c84f501ad4e8dbb123 (diff)
Better support client completion resolve caps
Diffstat (limited to 'crates/completion')
-rw-r--r--crates/completion/src/item.rs1
-rw-r--r--crates/completion/src/test_utils.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/crates/completion/src/item.rs b/crates/completion/src/item.rs
index 0e59f73cb..dc67df075 100644
--- a/crates/completion/src/item.rs
+++ b/crates/completion/src/item.rs
@@ -12,6 +12,7 @@ use crate::config::SnippetCap;
12/// `CompletionItem` describes a single completion variant in the editor pop-up. 12/// `CompletionItem` describes a single completion variant in the editor pop-up.
13/// It is basically a POD with various properties. To construct a 13/// It is basically a POD with various properties. To construct a
14/// `CompletionItem`, use `new` method and the `Builder` struct. 14/// `CompletionItem`, use `new` method and the `Builder` struct.
15#[derive(Clone)]
15pub struct CompletionItem { 16pub struct CompletionItem {
16 /// Used only internally in tests, to check only specific kind of 17 /// Used only internally in tests, to check only specific kind of
17 /// completion (postfix, keyword, reference, etc). 18 /// completion (postfix, keyword, reference, etc).
diff --git a/crates/completion/src/test_utils.rs b/crates/completion/src/test_utils.rs
index 4c1b1a839..516a63b4d 100644
--- a/crates/completion/src/test_utils.rs
+++ b/crates/completion/src/test_utils.rs
@@ -97,6 +97,7 @@ pub(crate) fn check_edit_with_config(
97 .unwrap_or_else(|| panic!("can't find {:?} completion in {:#?}", what, completions)); 97 .unwrap_or_else(|| panic!("can't find {:?} completion in {:#?}", what, completions));
98 let mut actual = db.file_text(position.file_id).to_string(); 98 let mut actual = db.file_text(position.file_id).to_string();
99 completion.text_edit().apply(&mut actual); 99 completion.text_edit().apply(&mut actual);
100 // TODO kb how to apply imports now?
100 assert_eq_text!(&ra_fixture_after, &actual) 101 assert_eq_text!(&ra_fixture_after, &actual)
101} 102}
102 103