From 1598740292c29613ef2b384a82de3a2735bc5566 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 13 Nov 2020 21:25:45 +0200 Subject: Reuse existing element rendering --- crates/completion/src/item.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/completion/src/item.rs') 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 { &self.text_edit } + pub fn update_text_edit(&mut self, new_text_edit: TextEdit) { + self.text_edit = new_text_edit; + } + /// Short one-line additional information, like a type pub fn detail(&self) -> Option<&str> { self.detail.as_deref() -- cgit v1.2.3