From a234b5a3cab6e134bfb644f91652532b68195f65 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 13 Dec 2019 16:08:47 -0500 Subject: [PATCH] LSP 3.15 supports the deprecated tag on completions --- crates/ra_lsp_server/src/conv.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index b13093cfe65..5561f6270b6 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs @@ -130,6 +130,11 @@ fn conv_with(self, ctx: (&LineIndex, LineEndings)) -> ::lsp_types::CompletionIte 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,