Skip to main content

map_severity

Function map_severity 

Source
pub fn map_severity(severity: Option<DiagnosticSeverity>) -> ErrorSeverity
Expand description

Map LSP’s severity onto the error list’s.

ErrorSeverity’s own doc-comment anticipated this: “producers map their own severity onto this small set.” A diagnostic with no severity is treated as an error — servers omit it rarely, and under-reporting a real error is worse than over-reporting a hint.