mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
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 <kjeremy@gmail.com>
This commit is contained in:
commit
169fe4932f
1 changed files with 5 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue