[][src]Function codespan_lsp::make_lsp_diagnostic

pub fn make_lsp_diagnostic(
    files: &Files,
    source: impl Into<Option<String>>,
    diagnostic: Diagnostic,
    correlate_file_url: impl FnMut(FileId) -> Result<Url, ()>
) -> Result<Diagnostic, Error>

Translates a codespan_reporting::Diagnostic to a languageserver_types::Diagnostic.

Since the language client requires Urls to locate the diagnostics, correlate_file_url is necessary to resolve codespan FileNames

code and file are left empty by this function