@@ -84,19 +84,18 @@ pub mod util {
84 None => None,
84 None => None,
87− let tags = if let Some(ref tags) = diag.tags {
87+ let new_tags: Vec<_> = diag
88− let new_tags = tags
88+ .tags
90− .map(|tag| match tag {
90+ .map(|tag| match tag {
91− helix_core::diagnostic::DiagnosticTag::Unnecessary => {
91+ helix_core::diagnostic::DiagnosticTag::Unnecessary => {
92− lsp::DiagnosticTag::UNNECESSARY
92+ lsp::DiagnosticTag::UNNECESSARY
94− helix_core::diagnostic::DiagnosticTag::Deprecated => {
94+ helix_core::diagnostic::DiagnosticTag::Deprecated => lsp::DiagnosticTag::DEPRECATED,
95− lsp::DiagnosticTag::DEPRECATED
98− .collect();
96+ .collect();
98+ let tags = if !new_tags.is_empty() {
100 Some(new_tags)
99 Some(new_tags)