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>
diff --git a/internal/lsp/inlay_hint.go b/internal/lsp/inlay_hint.go
index b2fd028..8d8a419 100644
--- a/internal/lsp/inlay_hint.go
+++ b/internal/lsp/inlay_hint.go
@@ -17,5 +17,5 @@
 	if !ok {
 		return nil, err
 	}
-	return source.InlayHint(ctx, snapshot, fh, params.ViewPort)
+	return source.InlayHint(ctx, snapshot, fh, params.Range)
 }
diff --git a/internal/lsp/lsp_test.go b/internal/lsp/lsp_test.go
index 2ec833b..e8febec 100644
--- a/internal/lsp/lsp_test.go
+++ b/internal/lsp/lsp_test.go
@@ -943,7 +943,7 @@
 		TextDocument: protocol.TextDocumentIdentifier{
 			URI: protocol.URIFromSpanURI(uri),
 		},
-		// TODO: add ViewPort
+		// TODO: add Range
 	})
 	if err != nil {
 		t.Fatal(err)
diff --git a/internal/lsp/protocol/tsprotocol.go b/internal/lsp/protocol/tsprotocol.go
index 647aabc..5dd3d09 100644
--- a/internal/lsp/protocol/tsprotocol.go
+++ b/internal/lsp/protocol/tsprotocol.go
@@ -2866,7 +2866,7 @@
 	/**
 	 * The visible document range for which inlay hints should be computed.
 	 */
-	ViewPort Range `json:"viewPort"`
+	Range Range `json:"range"`
 }
 
 /**
@@ -2988,7 +2988,7 @@
 	/**
 	 * 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.