Definitions and functionality for emitting diagnostic information such as errors, warnings and #command outputs from the LSP server.
- error : DiagnosticSeverity
- warning : DiagnosticSeverity
- information : DiagnosticSeverity
- hint : DiagnosticSeverity
Instances For
Equations
Equations
Equations
- Lean.Lsp.instBEqDiagnosticSeverity.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
- Lean.Lsp.instOrdDiagnosticSeverity.ord x✝ y✝ = compare x✝.ctorIdx y✝.ctorIdx
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.
Some languages have specific codes for each error type.
- int (i : Int) : DiagnosticCode
- string (s : String) : DiagnosticCode
Instances For
Equations
Equations
Equations
Instances For
Equations
- Lean.Lsp.instOrdDiagnosticCode.ord (Lean.Lsp.DiagnosticCode.int a) (Lean.Lsp.DiagnosticCode.int b) = (compare a b).then Ordering.eq
- Lean.Lsp.instOrdDiagnosticCode.ord (Lean.Lsp.DiagnosticCode.int a) x✝ = Ordering.lt
- Lean.Lsp.instOrdDiagnosticCode.ord x✝ (Lean.Lsp.DiagnosticCode.int a) = Ordering.gt
- Lean.Lsp.instOrdDiagnosticCode.ord (Lean.Lsp.DiagnosticCode.string a) (Lean.Lsp.DiagnosticCode.string b) = (compare a b).then Ordering.eq
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.
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
Equations
- Lean.Lsp.instBEqDiagnosticTag.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
- Lean.Lsp.instOrdDiagnosticTag.ord x✝ y✝ = compare x✝.ctorIdx y✝.ctorIdx
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.
Custom diagnostic tags provided by the language server. We use a separate diagnostic field for this to avoid confusing LSP clients with our custom tags.
- unsolvedGoals : LeanDiagnosticTag
Diagnostics representing an "unsolved goals" error. Corresponds to
MessageData.taggedTactic.unsolvedGoals ..`. - goalsAccomplished : LeanDiagnosticTag
Diagnostics representing a "goals accomplished" silent message. Corresponds to
MessageData.taggedgoalsAccomplished ..`.
Instances For
Equations
Equations
- Lean.Lsp.instBEqLeanDiagnosticTag.beq x✝ y✝ = (x✝.ctorIdx == y✝.ctorIdx)
Instances For
Equations
Equations
Equations
- Lean.Lsp.instOrdLeanDiagnosticTag.ord x✝ y✝ = compare x✝.ctorIdx y✝.ctorIdx
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
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
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 InteractiveMessage.
- range : Range
The range at which the message applies.
Extension: preserve semantic range of errors when truncating them for display purposes.
- severity? : Option DiagnosticSeverity
Extension: whether this diagnostic should not be displayed as a regular diagnostic in the editor. In VS Code, this means that the diagnostic does not have a squiggly and is not displayed in the InfoView under 'All Messages', but it is still displayed under 'Messages'. Defaults to
false.- code? : Option DiagnosticCode
The diagnostic's code, which might appear in the user interface.
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. SeeLean.Widget.InteractiveDiagnostic. - leanTags? : Option (Array LeanDiagnosticTag)
Additional Lean-specific metadata about the diagnostic.
A data entry field that is preserved between a
textDocument/publishDiagnosticsnotification andtextDocument/codeActionrequest.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
- Lean.Lsp.instBEqDiagnosticWith.beq x✝¹ x✝ = false
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- d.fullRange = d.fullRange?.getD d.range
Instances For
Instances For
Parameters for the textDocument/publishDiagnostics notification.
- uri : DocumentUri
Whether the client should append this set of diagnostics to the previous set rather than replacing the previous set by this one (the default LSP behavior).
falsemeans the client should replace.noneis equivalent tofalse. This is a Lean-specific extension (seeLeanClientCapabilities).- diagnostics : Array Diagnostic
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Lean.Lsp.instBEqPublishDiagnosticsParams.beq x✝¹ x✝ = false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.