Context
playground.perryts.com renders Perry compiler diagnostics. Today the web target offers setLineDiagnostics('line:severity:#color:message') — whole-line tinting + a right-aligned message. The compiler gives us precise source_range { start:{line,column}, end:{line,column} } (0-based), so we'd like Monaco-style underlines on the exact span plus a hover tooltip with the full message + code.
Requested API
setRangeDiagnostics(json: string): void;
// json = [{ startLine, startCol, endLine, endCol, severity, message, code? }, …] (0-based)
- Render a squiggle/underline under the exact range (severity-colored).
- On pointer hover over the range, show a tooltip with
message (and code if present).
Notes
- Line-level
setLineDiagnostics is a fine fallback and we use it today; this is the precision upgrade.
- Pairs well with
setCursor(line,col) (separate issue) so a diagnostics list can click-to-jump to the span.
Found while building the Perry playground.
Context
playground.perryts.comrenders Perry compiler diagnostics. Today the web target offerssetLineDiagnostics('line:severity:#color:message')— whole-line tinting + a right-aligned message. The compiler gives us precisesource_range { start:{line,column}, end:{line,column} }(0-based), so we'd like Monaco-style underlines on the exact span plus a hover tooltip with the full message + code.Requested API
message(andcodeif present).Notes
setLineDiagnosticsis a fine fallback and we use it today; this is the precision upgrade.setCursor(line,col)(separate issue) so a diagnostics list can click-to-jump to the span.Found while building the Perry playground.