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
- Lean.Lsp.instOrdDiagnosticSeverity = { compare := Lean.Lsp.ordDiagnosticSeverity✝ }
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: Int → Lean.Lsp.DiagnosticCode
- string: String → Lean.Lsp.DiagnosticCode
Instances For
Equations
- Lean.Lsp.instInhabitedDiagnosticCode = { default := Lean.Lsp.DiagnosticCode.int default }
Equations
Equations
- Lean.Lsp.instOrdDiagnosticCode = { compare := Lean.Lsp.ordDiagnosticCode✝ }
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: 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.
Instances For
Equations
Equations
Equations
- Lean.Lsp.instOrdDiagnosticTag = { compare := Lean.Lsp.ordDiagnosticTag✝ }
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.
- location : Lean.Lsp.Location
- message : String
Instances For
Equations
- Lean.Lsp.instInhabitedDiagnosticRelatedInformation = { default := { location := default, message := default } }
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)
.
- range : Lean.Lsp.Range
The range at which the message applies.
- fullRange? : Option Lean.Lsp.Range
Extension: preserve semantic range of errors when truncating them for display purposes.
- severity? : Option Lean.Lsp.DiagnosticSeverity
- code? : Option Lean.Lsp.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
. A data entry field that is preserved between a
textDocument/publishDiagnostics
notification andtextDocument/codeAction
request.
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
- d.fullRange = d.fullRange?.getD d.range
Instances For
Equations
- Lean.Lsp.DiagnosticWith.instOrdUserVisible = { compare := Lean.Lsp.DiagnosticWith.ordUserVisible✝ }
Instances For
Parameters for the textDocument/publishDiagnostics
notification.
- uri : Lean.Lsp.DocumentUri
- diagnostics : Array Lean.Lsp.Diagnostic
Instances For
Equations
- Lean.Lsp.instInhabitedPublishDiagnosticsParams = { default := { uri := default, version? := default, diagnostics := default } }