fn to_lsp(pd: &PositionalDiagnostic, rope: &Rope) -> DiagnosticExpand description
Convert a PositionalDiagnostic to an LSP Diagnostic.
Used by the per-keystroke parse path which builds PositionalDiagnostics
with both error and warning severity. The validation / typecheck flows
build Diagnostics directly via build_error_diagnostic.