Skip to main content

to_lsp_diagnostic

Function to_lsp_diagnostic 

Source
pub fn to_lsp_diagnostic(
    diag: &JsonDiagnostic,
    workspace_root: Option<&Path>,
) -> Option<(PathBuf, Diagnostic)>
Expand description

Convert one Gruel JsonDiagnostic to an LSP Diagnostic and the file path it belongs to. Returns None if the diagnostic has no primary span.