diff --git a/internal/lsp/inlay_hint.go b/internal/lsp/inlay_hint.go index b2fd028d72..8d8a419c23 100644 --- a/internal/lsp/inlay_hint.go +++ b/internal/lsp/inlay_hint.go @@ -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) } diff --git a/internal/lsp/lsp_test.go b/internal/lsp/lsp_test.go index 2ec833b860..e8febec93f 100644 --- a/internal/lsp/lsp_test.go +++ b/internal/lsp/lsp_test.go @@ -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) diff --git a/internal/lsp/protocol/tsprotocol.go b/internal/lsp/protocol/tsprotocol.go index 647aabc2ee..5dd3d09e18 100644 --- a/internal/lsp/protocol/tsprotocol.go +++ b/internal/lsp/protocol/tsprotocol.go @@ -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.