diff options
Diffstat (limited to 'crates/ra_ide/src/completion/completion_item.rs')
-rw-r--r-- | crates/ra_ide/src/completion/completion_item.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_ide/src/completion/completion_item.rs b/crates/ra_ide/src/completion/completion_item.rs index edbf4a5b7..fb06cc125 100644 --- a/crates/ra_ide/src/completion/completion_item.rs +++ b/crates/ra_ide/src/completion/completion_item.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | use std::fmt; | 3 | use std::fmt; |
4 | 4 | ||
5 | use super::completion_config::SnippetCap; | ||
5 | use hir::Documentation; | 6 | use hir::Documentation; |
6 | use ra_syntax::TextRange; | 7 | use ra_syntax::TextRange; |
7 | use ra_text_edit::TextEdit; | 8 | use ra_text_edit::TextEdit; |
@@ -270,7 +271,11 @@ impl Builder { | |||
270 | self.insert_text = Some(insert_text.into()); | 271 | self.insert_text = Some(insert_text.into()); |
271 | self | 272 | self |
272 | } | 273 | } |
273 | pub(crate) fn insert_snippet(mut self, snippet: impl Into<String>) -> Builder { | 274 | pub(crate) fn insert_snippet( |
275 | mut self, | ||
276 | _cap: SnippetCap, | ||
277 | snippet: impl Into<String>, | ||
278 | ) -> Builder { | ||
274 | self.insert_text_format = InsertTextFormat::Snippet; | 279 | self.insert_text_format = InsertTextFormat::Snippet; |
275 | self.insert_text(snippet) | 280 | self.insert_text(snippet) |
276 | } | 281 | } |
@@ -282,7 +287,7 @@ impl Builder { | |||
282 | self.text_edit = Some(edit); | 287 | self.text_edit = Some(edit); |
283 | self | 288 | self |
284 | } | 289 | } |
285 | pub(crate) fn snippet_edit(mut self, edit: TextEdit) -> Builder { | 290 | pub(crate) fn snippet_edit(mut self, _cap: SnippetCap, edit: TextEdit) -> Builder { |
286 | self.insert_text_format = InsertTextFormat::Snippet; | 291 | self.insert_text_format = InsertTextFormat::Snippet; |
287 | self.text_edit(edit) | 292 | self.text_edit(edit) |
288 | } | 293 | } |