aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-12-13 21:17:41 +0000
committerGitHub <[email protected]>2019-12-13 21:17:41 +0000
commit169fe4932f84f396965a4814c44e31061673937c (patch)
tree3f411ec1302c68b0ad88623dbc1c1ae847ae5c76
parent9c9f4635b4eb7d987717b4064a7de789f7983e2a (diff)
parenta234b5a3cab6e134bfb644f91652532b68195f65 (diff)
Merge #2555
2555: LSP 3.15 supports the deprecated tag on completions r=matklad a=kjeremy So let's set it. Co-authored-by: kjeremy <[email protected]>
-rw-r--r--crates/ra_lsp_server/src/conv.rs5
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,