From 98df4c70bed4257d67f661795a408da85d2ce752 Mon Sep 17 00:00:00 2001 From: Peter Weinberger Date: Mon, 7 Jan 2019 14:34:44 -0500 Subject: [PATCH] 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 --- internal/lsp/protocol/basic.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/internal/lsp/protocol/basic.go b/internal/lsp/protocol/basic.go index 05174d9f..0dd2f5e4 100644 --- a/internal/lsp/protocol/basic.go +++ b/internal/lsp/protocol/basic.go @@ -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 {