mirror of
https://github.com/laravel-ls/protocol.git
synced 2026-06-16 03:54:56 +02:00
document_diagnostic.go: add publish diagnostics notification types and tests
This commit is contained in:
parent
5fe36eb7d6
commit
188c70fa2b
2 changed files with 43 additions and 1 deletions
|
|
@ -6,7 +6,8 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
MethodTextDocumentDiagnostic = "textDocument/diagnostic"
|
||||
MethodTextDocumentDiagnostic = "textDocument/diagnostic"
|
||||
MethodTextDocumentPublishDiagnostics = "textDocument/publishDiagnostics"
|
||||
)
|
||||
|
||||
// DocumentDiagnosticParams - Parameters of the document diagnostic request.
|
||||
|
|
@ -29,6 +30,24 @@ type DocumentDiagnosticParams struct {
|
|||
PreviousResultID string `json:"previousResultId,omitempty"`
|
||||
}
|
||||
|
||||
// PublishDiagnosticsParams - The parameters of a publish diagnostics notification.
|
||||
//
|
||||
// @since 3.0.0
|
||||
//
|
||||
// See https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#publishDiagnosticsParams
|
||||
type PublishDiagnosticsParams struct {
|
||||
// The URI for which diagnostic information is reported.
|
||||
URI DocumentURI `json:"uri"`
|
||||
|
||||
// Optional the version number of the document the diagnostics are published for.
|
||||
//
|
||||
// @since 3.15.0
|
||||
Version int `json:"version,omitempty"`
|
||||
|
||||
// An array of diagnostic information items.
|
||||
Diagnostics []Diagnostic `json:"diagnostics"`
|
||||
}
|
||||
|
||||
// DocumentDiagnosticReport is either a full or an unchanged diagnostic report.
|
||||
//
|
||||
// @since 3.17.0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue