Commit b108487
extension/src/language: attach selected range to hover request
The middleware API allow the extension developer to modify the
input parameter of the call back function "next" but does not
allow the extension developer to introduce new arguments.
The vscode-languageclient still responsible for the putting up
the final parameter and send to gopls.
Based on the proposal from microsoft/language-server-protocol#377,
the final state is introducing a "range" field in PositionParams.
I think it make more sense to call a separate gopls command
"gopls.lsp" with method "hover" (CL 706335) instead of forcely
embeding a "range" field to the "position" field.
The vscode-go extension only send the selected range if the range
and the original position come from the same text document.
For golang/go#69058
Change-Id: Ie65a5d62d220882865a22f3749ed9330b6234975
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/706336
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Hongxiang Jiang <[email protected]>
Reviewed-by: Madeline Kalil <[email protected]>1 parent 5b8a911 commit b108487
1 file changed
+35
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
473 | 474 | | |
474 | 475 | | |
475 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
476 | 511 | | |
477 | 512 | | |
478 | 513 | | |
| |||
0 commit comments