Skip to content

Commit

Permalink
tools/internal/lsp/protocol: add LocationLink type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pjweinbgo committed Jan 9, 2019
1 parent 421f03a commit 98df4c7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions internal/lsp/protocol/basic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 98df4c7

Please sign in to comment.