1
0
mirror of https://github.com/golang/go synced 2024-11-18 13:14:47 -07:00

tools/internal/lsp/protocol: add LocationLink type

LocationLink was added in 3.14.0 of lsp.

Change-Id: I388dba5ab43b195cc3965e4199b49155094a2627
Reviewed-on: https://go-review.googlesource.com/c/156617
Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
Peter Weinberger 2019-01-07 14:34:44 -05:00
parent 421f03a57a
commit 98df4c70be

View File

@ -63,6 +63,32 @@ type Location struct {
Range Range `json:"range"`
}
// LocationLink rerpesents a link betwee a source and a target location.AfterDelay
type LocationLink struct {
/**
* Span of the origin of this link.
*
* Used as the underlined span for mouse interaction. Defaults to the word range at
* the mouse position.
*/
OriginSelectionRange *Range `json:"originSelectionRange,omitempty"`
/**
* The target resource identifier of this link.
*/
TargetURI string `json:"targetUri"`
/**
* The full target range of this link.
*/
TargetRange Range `json:"targetRange"`
/**
* The span of this link.
*/
TargetSelectionRange *Range `json:"targetSeletionRange,omitempty"`
}
// Diagnostic represents a diagnostic, such as a compiler error or warning.
// Diagnostic objects are only valid in the scope of a resource.
type Diagnostic struct {