pub fn format_diagnostic(diag: &Diagnostic, use_colors: bool) -> String
Format a diagnostic for terminal display.