class LSP::Diagnostic

Overview

Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource. See: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#diagnostic

Included Modules

Defined in:

base/diagnostic.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(line : Int32 | Nil, column : Int32 | Nil, size : Int32 | Nil, message : String, source : Nil | String, related_information : Nil | Array(LSP::DiagnosticRelatedInformation) = nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.new(**args) #

[View source]

Instance Method Detail

def code : Int32 | String | Nil #

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


[View source]
def code=(code : Int32 | String | Nil) #

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


[View source]
def message : String #

The diagnostic's message.


[View source]
def message=(message : String) #

The diagnostic's message.


[View source]
def range : Range #

The range at which the message applies.


[View source]
def range=(range : Range) #

The range at which the message applies.


[View source]
def related_information : Array(DiagnosticRelatedInformation) | Nil #

[View source]
def related_information=(related_information : Array(DiagnosticRelatedInformation) | Nil) #

[View source]
def severity : Int32 | Nil #

The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.


[View source]
def severity=(severity : Int32 | Nil) #

The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.


[View source]
def source : String | Nil #

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


[View source]
def source=(source : String | Nil) #

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


[View source]
def tags : Array(DiagnosticTag) | Nil #

Additional metadata about the diagnostic.


[View source]
def tags=(tags : Array(DiagnosticTag) | Nil) #

Additional metadata about the diagnostic.


[View source]