From 2bebc5042e5e50a6cd7691f3590184c4499376a7 Mon Sep 17 00:00:00 2001 From: Matouš Dzivjak Date: Mon, 13 Feb 2023 03:44:31 +0100 Subject: feat(ui): deprecated completions (#5932) * feat(ui): deprecated completions Mark deprecated completions using strike-through (CROSSED_OUT modifier). The deprection information is taken either from the `deprecated` field of the completion item or from the completion tags. The field seems to be the older way of passing the deprecated information and it was already marked as deprecated for Symbol. In completion item the field is still valid but it seems that the LSP is moving in the general direction of using tags for this kind of information and as such relying on tags as well seems reasonable and future-proof. --- helix-lsp/src/client.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'helix-lsp') diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs index 2f5b498d..46772dd2 100644 --- a/helix-lsp/src/client.rs +++ b/helix-lsp/src/client.rs @@ -329,6 +329,10 @@ impl Client { ], }), insert_replace_support: Some(true), + deprecated_support: Some(true), + tag_support: Some(lsp::TagSupport { + value_set: vec![lsp::CompletionItemTag::DEPRECATED], + }), ..Default::default() }), completion_item_kind: Some(lsp::CompletionItemKindCapability { -- cgit v1.2.3-70-g09d2