File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ use gpui::{
88use itertools:: Itertools ;
99use language:: CodeLabel ;
1010use language:: { Buffer , LanguageName , LanguageRegistry } ;
11+ use lsp:: CompletionItemTag ;
1112use markdown:: { Markdown , MarkdownElement } ;
1213use multi_buffer:: { Anchor , ExcerptId } ;
1314use ordered_float:: OrderedFloat ;
@@ -840,7 +841,16 @@ impl CompletionsMenu {
840841 if completion
841842 . source
842843 . lsp_completion ( false )
843- . and_then ( |lsp_completion| lsp_completion. deprecated )
844+ . and_then ( |lsp_completion| {
845+ match ( lsp_completion. deprecated , & lsp_completion. tags )
846+ {
847+ ( Some ( true ) , _) => Some ( true ) ,
848+ ( _, Some ( tags) ) => Some (
849+ tags. contains ( & CompletionItemTag :: DEPRECATED ) ,
850+ ) ,
851+ _ => None ,
852+ }
853+ } )
844854 . unwrap_or ( false )
845855 {
846856 highlight. strikethrough = Some ( StrikethroughStyle {
Original file line number Diff line number Diff line change @@ -764,6 +764,10 @@ impl LanguageServer {
764764 // "textEdit".to_string(),
765765 ] ,
766766 } ) ,
767+ deprecated_support : Some ( true ) ,
768+ tag_support : Some ( TagSupport {
769+ value_set : vec ! [ CompletionItemTag :: DEPRECATED ] ,
770+ } ) ,
767771 insert_replace_support : Some ( true ) ,
768772 label_details_support : Some ( true ) ,
769773 insert_text_mode_support : Some ( InsertTextModeSupport {
You can’t perform that action at this time.
0 commit comments