@@ -102,16 +102,17 @@ pub mod util {
102102 None
103103 };
104104
105− // TODO: add support for Diagnostic.data
106− lsp::Diagnostic::new(
107− range_to_lsp_range(doc, range, offset_encoding),
105+ lsp::Diagnostic {
106+ range: range_to_lsp_range(doc, range, offset_encoding),
108107 severity,
109108 code,
110− diag.source.clone(),
111− diag.message.to_owned(),
112− None,
109+ source: diag.source.clone(),
110+ message: diag.message.to_owned(),
111+ related_information: None,
113112 tags,
114− )
113+ data: diag.data.to_owned(),
114+ ..Default::default()
115+ }
115116 }
116117
117118 /// Converts [`lsp::Position`] to a position in the document.