@@ -2,7 +2,7 @@ use arc_swap::{access::Map, ArcSwap};
22use futures_util::Stream;
33use helix_core::{
44 config::{default_syntax_loader, user_syntax_loader},
5− diagnostic::NumberOrString,
5+ diagnostic::{DiagnosticTag, NumberOrString},
66 pos_at_coords, syntax, Selection,
77};
88use helix_lsp::{lsp, util::lsp_pos_to_pos, LspProgressMap};
@@ -605,13 +605,28 @@ impl Application {
605605 None => None,
606606 };
607607
608+ let tags = if let Some(ref tags) = diagnostic.tags {
609+ let new_tags = tags.iter().filter_map(|tag| {
610+ match *tag {
611+ lsp::DiagnosticTag::DEPRECATED => Some(DiagnosticTag::Deprecated),
612+ lsp::DiagnosticTag::UNNECESSARY => Some(DiagnosticTag::Unnecessary),
613+ _ => None
614+ }
615+ }).collect();
616+
617+ Some(new_tags)
618+ } else {
619+ None
620+ };
621+
608622 Some(Diagnostic {
609623 range: Range { start, end },
610624 line: diagnostic.range.start.line as usize,
611625 message: diagnostic.message.clone(),
612626 severity,
613627 code,
614− // source
628+ tags,
629+ source: diagnostic.source.clone()
615630 })
616631 })
617632 .collect();