Definitions and functionality for emitting diagnostic information such as errors, warnings and #command outputs from the LSP server.
- error: Lean.Lsp.DiagnosticSeverity
- warning: Lean.Lsp.DiagnosticSeverity
- information: Lean.Lsp.DiagnosticSeverity
- hint: Lean.Lsp.DiagnosticSeverity
Instances For
Equations
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.
- int: Int → Lean.Lsp.DiagnosticCode
- string: String → Lean.Lsp.DiagnosticCode
Some languages have specific codes for each error type.
Instances For
Equations
- Lean.Lsp.instInhabitedDiagnosticCode = { default := Lean.Lsp.DiagnosticCode.int default }
Equations
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.
- unnecessary: Lean.Lsp.DiagnosticTag
Unused or unnecessary code. Rendered as faded out eg for unused variables.
- deprecated: Lean.Lsp.DiagnosticTag
Deprecated or obsolete code. Rendered with a strike-through.
Tags representing additional metadata about the diagnostic.
Instances For
Equations
Equations
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.
- location : Lean.Lsp.Location
- message : String
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
Equations
- Lean.Lsp.instInhabitedDiagnosticRelatedInformation = { default := { location := default, message := default } }
The range at which the message applies.
range : Lean.Lsp.RangeExtension: preserve semantic range of errors when truncating them for display purposes.
fullRange? : Option Lean.Lsp.Range- severity? : Option Lean.Lsp.DiagnosticSeverity
The diagnostic's code, which might appear in the user interface.
code? : Option Lean.Lsp.DiagnosticCodeA human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.
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. SeeLean.Widget.InteractiveDiagnostic.message : αA data entry field that is preserved between a
textDocument/publishDiagnosticsnotification andtextDocument/codeActionrequest.
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).
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Lsp.instBEqDiagnosticWith = { beq := Lean.Lsp.beqDiagnosticWith✝ }
Equations
- Lean.Lsp.instToJsonDiagnosticWith = { toJson := Lean.Lsp.toJsonDiagnosticWith✝ }
Equations
- Lean.Lsp.instFromJsonDiagnosticWith = { fromJson? := Lean.Lsp.fromJsonDiagnosticWith✝ }
Equations
- Lean.Lsp.DiagnosticWith.fullRange d = Option.getD d.fullRange? d.range
- uri : Lean.Lsp.DocumentUri
- diagnostics : Array Lean.Lsp.Diagnostic
Parameters for the textDocument/publishDiagnostics notification.
Instances For
Equations
- Lean.Lsp.instInhabitedPublishDiagnosticsParams = { default := { uri := default, version? := default, diagnostics := default } }