class

LSP::Diagnostic

Inherits JSON::Serializable < LSP::Initializer < Reference < Object

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

Constructors

new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

code

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

Source
code=(code : Int32 | String | Nil)

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

Source
message

The diagnostic's message.

Source
message=(message : String)

The diagnostic's message.

Source
range

The range at which the message applies.

Source
range=(range : Range)

The range at which the message applies.

Source
severity

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

Source
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.

Source
source

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

Source
source=(source : String | Nil)

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

Source
tags

Additional metadata about the diagnostic.

Source
tags=(tags : Array(DiagnosticTag) | Nil)

Additional metadata about the diagnostic.

Source