View Source GenLSP.Structures.Diagnostic (gen_lsp v0.9.0)

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

Link to this section Summary

Functions

Fields

  • range: The range at which the message applies

Link to this section Types

@type t() :: %GenLSP.Structures.Diagnostic{
  code: (integer() | String.t()) | nil,
  code_description: GenLSP.Structures.CodeDescription.t() | nil,
  data: GenLSP.TypeAlias.LSPAny.t() | nil,
  message: String.t(),
  range: GenLSP.Structures.Range.t(),
  related_information:
    [GenLSP.Structures.DiagnosticRelatedInformation.t()] | nil,
  severity: GenLSP.Enumerations.DiagnosticSeverity.t() | nil,
  source: String.t() | nil,
  tags: [GenLSP.Enumerations.DiagnosticTag.t()] | nil
}

Link to this section Functions

Link to this function

%GenLSP.Structures.Diagnostic{}

View Source (struct)

fields

Fields

  • range: The range at which the message applies

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

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

  • 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: A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'. It usually appears in the user interface.

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

  • tags: Additional metadata about the diagnostic.

    @since 3.15.0

  • related_information: An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

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

    @since 3.16.0