class

LSProtocol::Diagnostic

Inherits JSON::Serializable / Reference / Object

Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.

Constructors

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

Instance methods

code

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

Source
code_description

An optional property to describe the error code. Requires the code field (above) to be present/not null.

@since 3.16.0

Source
data

A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request.

@since 3.16.0

Source
message

The diagnostic's message. It usually appears in the user interface

Source
range

The range at which the message applies

Source
severity

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.

Source
source

A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface.

Source
tags

Additional metadata about the diagnostic.

@since 3.15.0

Source