mirror of https://github.com/golang/go.git
internal/lsp: rename viewport to range
The final LSP spec for 3.17 changed the name of ViewPort to Range for both InlayHints and InlineValues. This manually updates just these fields in our protocol. Change-Id: I0303a36536016ca59c87dc45f55fadcd80e72bfc Reviewed-on: https://go-review.googlesource.com/c/tools/+/413677 Reviewed-by: Robert Findley <rfindley@google.com> Run-TryBot: Suzy Mueller <suzmue@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> gopls-CI: kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
3f5f798e2a
commit
22ab2538d4
|
|
@ -17,5 +17,5 @@ func (s *Server) inlayHint(ctx context.Context, params *protocol.InlayHintParams
|
|||
if !ok {
|
||||
return nil, err
|
||||
}
|
||||
return source.InlayHint(ctx, snapshot, fh, params.ViewPort)
|
||||
return source.InlayHint(ctx, snapshot, fh, params.Range)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -943,7 +943,7 @@ func (r *runner) InlayHints(t *testing.T, spn span.Span) {
|
|||
TextDocument: protocol.TextDocumentIdentifier{
|
||||
URI: protocol.URIFromSpanURI(uri),
|
||||
},
|
||||
// TODO: add ViewPort
|
||||
// TODO: add Range
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
|||
|
|
@ -2866,7 +2866,7 @@ type InlayHintParams struct {
|
|||
/**
|
||||
* The visible document range for which inlay hints should be computed.
|
||||
*/
|
||||
ViewPort Range `json:"viewPort"`
|
||||
Range Range `json:"range"`
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2988,7 +2988,7 @@ type InlineValueParams struct {
|
|||
/**
|
||||
* The visible document range for which inline values should be computed.
|
||||
*/
|
||||
ViewPort Range `json:"viewPort"`
|
||||
Range Range `json:"range"`
|
||||
/**
|
||||
* Additional information about the context in which inline values were
|
||||
* requested.
|
||||
|
|
|
|||
Loading…
Reference in New Issue