class LSProtocol::Diagnostic
- LSProtocol::Diagnostic
- Reference
- Object
Overview
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
Included Modules
- JSON::Serializable
Defined in:
lsprotocol/types.crConstructors
- .new(message : String | Nil, range : Range | Nil, code : Int32 | String | Nil = nil, code_description : CodeDescription | Nil = nil, data : LSPAny | Nil = nil, related_information : Array(DiagnosticRelatedInformation) | Nil = nil, severity : DiagnosticSeverity | Nil = nil, source : String | Nil = nil, tags : Array(DiagnosticTag) | Nil = nil)
- .new(pull : JSON::PullParser)
Instance Method Summary
-
#code : Int32 | String | Nil
The diagnostic's code, which usually appear in the user interface.
- #code_description : CodeDescription | Nil
-
#data : LSPAny | Nil
A data entry field that is preserved between a
textDocument/publishDiagnostics
notification andtextDocument/codeAction
request. -
#message : String
The diagnostic's message.
-
#range : Range
The range at which the message applies
- #related_information : Array(DiagnosticRelatedInformation) | Nil
-
#severity : DiagnosticSeverity | Nil
The diagnostic's severity.
-
#source : String | Nil
A human-readable string describing the source of this diagnostic, e.g.
-
#tags : Array(DiagnosticTag) | Nil
Additional metadata about the diagnostic.
Constructor Detail
Instance Method Detail
The diagnostic's code, which usually appear in the user interface.
A data entry field that is preserved between a textDocument/publishDiagnostics
notification and textDocument/codeAction
request.
@since 3.16.0
The diagnostic's severity. To avoid interpretation mismatches when a server is used with different clients it is highly recommended that servers always provide a severity value.
A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface.