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?, column : Int32?, size : Int32?, message : String, source : String?, related_information : Array(LSP::DiagnosticRelatedInformation)? = nil) #

def self.new(pull : JSON::PullParser) #

def self.new(**args) #

Instance Method Detail

def code : Int32 | String | Nil #

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


def code=(code : Int32 | String | Nil) #

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


def message : String #

The diagnostic's message.


def message=(message : String) #

The diagnostic's message.


def range : Range #

The range at which the message applies.


def range=(range : Range) #

The range at which the message applies.


def related_information : Array(DiagnosticRelatedInformation)? #

def related_information=(related_information : Array(DiagnosticRelatedInformation)?) #

def severity : Int32? #

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


def severity=(severity : Int32?) #

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


def source : String? #

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


def source=(source : String?) #

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


def tags : Array(DiagnosticTag)? #

Additional metadata about the diagnostic.


def tags=(tags : Array(DiagnosticTag)?) #

Additional metadata about the diagnostic.