From a234b5a3cab6e134bfb644f91652532b68195f65 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 13 Dec 2019 16:08:47 -0500 Subject: LSP 3.15 supports the deprecated tag on completions --- crates/ra_lsp_server/src/conv.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_lsp_server/src/conv.rs') diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index b13093cfe..5561f6270 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -130,6 +130,11 @@ impl ConvWith<(&LineIndex, LineEndings)> for CompletionItem { deprecated: Some(self.deprecated()), ..Default::default() }; + + if self.deprecated() { + res.tags = Some(vec![lsp_types::CompletionItemTag::Deprecated]) + } + res.insert_text_format = Some(match self.insert_text_format() { InsertTextFormat::Snippet => lsp_types::InsertTextFormat::Snippet, InsertTextFormat::PlainText => lsp_types::InsertTextFormat::PlainText, -- cgit v1.2.3