diff options
author | kjeremy <[email protected]> | 2019-12-13 21:08:47 +0000 |
---|---|---|
committer | kjeremy <[email protected]> | 2019-12-13 21:08:47 +0000 |
commit | a234b5a3cab6e134bfb644f91652532b68195f65 (patch) | |
tree | 3f411ec1302c68b0ad88623dbc1c1ae847ae5c76 /crates | |
parent | 9c9f4635b4eb7d987717b4064a7de789f7983e2a (diff) |
LSP 3.15 supports the deprecated tag on completions
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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 { | |||
130 | deprecated: Some(self.deprecated()), | 130 | deprecated: Some(self.deprecated()), |
131 | ..Default::default() | 131 | ..Default::default() |
132 | }; | 132 | }; |
133 | |||
134 | if self.deprecated() { | ||
135 | res.tags = Some(vec![lsp_types::CompletionItemTag::Deprecated]) | ||
136 | } | ||
137 | |||
133 | res.insert_text_format = Some(match self.insert_text_format() { | 138 | res.insert_text_format = Some(match self.insert_text_format() { |
134 | InsertTextFormat::Snippet => lsp_types::InsertTextFormat::Snippet, | 139 | InsertTextFormat::Snippet => lsp_types::InsertTextFormat::Snippet, |
135 | InsertTextFormat::PlainText => lsp_types::InsertTextFormat::PlainText, | 140 | InsertTextFormat::PlainText => lsp_types::InsertTextFormat::PlainText, |