[−][src]Function codespan_lsp::make_lsp_diagnostic
pub fn make_lsp_diagnostic<F>(
code_map: &CodeMap,
diagnostic: Diagnostic,
codespan_name_to_file: F
) -> Result<Diagnostic, Error> where
F: FnMut(&FileName) -> Result<Url, ()>,
Translates a codespan_reporting::Diagnostic
to a languageserver_types::Diagnostic
.
Since the language client requires Url
s to locate the errors codespan_name_to_file
is
necessary to resolve codespan FileName
s
code
and source
are left empty by this function