Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions structures.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ type Diagnostic struct {
*/
Code string `json:"code,omitempty"`

/**
* CodeDescription is a optional property to describe the error code.
*
* @since 3.16.0
*/
CodeDescription *CodeDescription `json:"codeDescription,omitempty"`

/**
* A human-readable string describing the source of this
* diagnostic, e.g. 'typescript' or 'super lint'.
Expand All @@ -66,6 +73,19 @@ type Diagnostic struct {
* The diagnostic's message.
*/
Message string `json:"message"`

/**
* Tags is additional metadata about the diagnostic.
*
* @since 3.15.0
*/
Tags []DiagnosticTag `json:"tags,omitempty"`

/**
* An array of related diagnostic information, e.g. when symbol-names within
* a scope collide all definitions can be marked via this property.
*/
RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitempty"`
}

type DiagnosticSeverity int
Expand All @@ -77,6 +97,31 @@ const (
Hint = 4
)

type CodeDescription struct {
/**
* Href is a URI to open with more information about the diagnostic error.
*/
Href string `json:"href"`
}

type DiagnosticTag int

const (
Unnecessary DiagnosticTag = 1
Deprecated DiagnosticTag = 2
)

type DiagnosticRelatedInformation struct {
/**
* The location of this related diagnostic information.
*/
Location Location `json:"location"`
/**
* The message of this related diagnostic information.
*/
Message string `json:"message"`
}

type Command struct {
/**
* Title of the command, like `save`.
Expand Down