aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/item.rs
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-11-13 19:25:45 +0000
committerKirill Bulatov <[email protected]>2020-11-16 19:19:06 +0000
commit1598740292c29613ef2b384a82de3a2735bc5566 (patch)
treebc2451b9fe6cf7943fcbcaaa762c9591c0bad9c6 /crates/completion/src/item.rs
parent4c8edd003aa447bd2da10fd81b24f582deacdc11 (diff)
Reuse existing element rendering
Diffstat (limited to 'crates/completion/src/item.rs')
-rw-r--r--crates/completion/src/item.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/completion/src/item.rs b/crates/completion/src/item.rs
index f23913935..53a12a763 100644
--- a/crates/completion/src/item.rs
+++ b/crates/completion/src/item.rs
@@ -218,6 +218,10 @@ impl CompletionItem {
218 &self.text_edit 218 &self.text_edit
219 } 219 }
220 220
221 pub fn update_text_edit(&mut self, new_text_edit: TextEdit) {
222 self.text_edit = new_text_edit;
223 }
224
221 /// Short one-line additional information, like a type 225 /// Short one-line additional information, like a type
222 pub fn detail(&self) -> Option<&str> { 226 pub fn detail(&self) -> Option<&str> {
223 self.detail.as_deref() 227 self.detail.as_deref()