aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
authorMatouš Dzivjak2023-02-13 02:44:31 +0000
committerGitHub2023-02-13 02:44:31 +0000
commit2bebc5042e5e50a6cd7691f3590184c4499376a7 (patch)
treea4b88d5ea727e3924f7be0b7493318e2f6348f82 /helix-lsp
parent8b09b0094285bb832ab88ac001b1fe631b10bfb1 (diff)
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.
Diffstat (limited to 'helix-lsp')
-rw-r--r--helix-lsp/src/client.rs4
1 files changed, 4 insertions, 0 deletions
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 {