@@ -102,16 +102,17 @@ pub mod util {
105− // TODO: add support for Diagnostic.data
106− lsp::Diagnostic::new(
105+ lsp::Diagnostic {
107− range_to_lsp_range(doc, range, offset_encoding),
106+ range: range_to_lsp_range(doc, range, offset_encoding),
108 severity,
107 severity,
110− diag.source.clone(),
109+ source: diag.source.clone(),
111− diag.message.to_owned(),
110+ message: diag.message.to_owned(),
112− None,
111+ related_information: None,
114− )
113+ data: diag.data.to_owned(),
114+ ..Default::default()
117 /// Converts [`lsp::Position`] to a position in the document.
118 /// Converts [`lsp::Position`] to a position in the document.