Documentation

Lean.Data.Lsp.Diagnostics

Definitions and functionality for emitting diagnostic information such as errors, warnings and #command outputs from the LSP server.

LSP: Diagnostic; LSP: textDocument/publishDiagnostics

Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.

Some languages have specific codes for each error type.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Equations
    • One or more equations did not get rendered due to their size.

    Tags representing additional metadata about the diagnostic.

    • unnecessary : DiagnosticTag

      Unused or unnecessary code. Rendered as faded out eg for unused variables.

    • deprecated : DiagnosticTag

      Deprecated or obsolete code. Rendered with a strike-through.

    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Equations
      • One or more equations did not get rendered due to their size.

      Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or are related to a diagnostics, e.g when duplicating a symbol in a scope.

      Instances For

        Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.

        LSP accepts a Diagnostic := DiagnosticWith String. The infoview also accepts InteractiveDiagnostic := DiagnosticWith (TaggedText MsgEmbed).

        reference

        • range : Range

          The range at which the message applies.

        • fullRange? : Option Range

          Extension: preserve semantic range of errors when truncating them for display purposes.

        • The diagnostic's code, which might appear in the user interface.

        • source? : Option String

          A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.

        • message : α

          Parametrised by the type of message data. LSP diagnostics use String, whereas in Lean's interactive diagnostics we use the type of widget-enriched text. See Lean.Widget.InteractiveDiagnostic.

        • Additional metadata about the diagnostic.

        • relatedInformation? : Option (Array DiagnosticRelatedInformation)

          An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

        • data? : Option Json

          A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request.

        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Equations
          • d.fullRange = d.fullRange?.getD d.range
          Instances For
            @[reducible, inline]
            Equations
            Instances For