You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
11445: Upstream inlay hints r=lnicola a=lnicola
Closes#2797Closes#3394 (since now resolve the hints for the range given only, not for the whole document. We don't actually resolve anything due to [hard requirement](#11445 (comment)) on label being immutable. Any further heavy actions could go to the `resolve` method that's now available via the official Code API for hints)
Based on `@SomeoneToIgnore's` branch, with a couple of updates:
- I squashed, more or less successfully, the commits on that branch
- downloading the `.d.ts` no longer works, but you can get it manually from https://raw.githubusercontent.com/microsoft/vscode/release/1.64/src/vscode-dts/vscode.proposed.inlayHints.d.ts
- you might need to pass `--enable-proposed-api matklad.rust-analyzer`
- if I'm reading the definition right, `InlayHintKind` needs to be serialized as a number, not string
- this doesn't work anyway -- the client-side gets the hints, but they don't display
Co-authored-by: Kirill Bulatov <[email protected]>
Co-authored-by: Laurențiu Nicola <[email protected]>
Copy file name to clipboardExpand all lines: docs/dev/lsp-extensions.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
<!---
2
-
lsp_ext.rs hash: 5b53b92c9f9d6650
2
+
lsp_ext.rs hash: e32fdde032ff6ebc
3
3
4
4
If you need to change the above hash to make the test pass, please check if you
5
5
need to adjust this doc as well and ping this issue:
@@ -562,11 +562,11 @@ Expands macro call at a given position.
562
562
563
563
## Inlay Hints
564
564
565
-
**Method:**`rust-analyzer/inlayHints`
565
+
**Method:**`experimental/inlayHints`
566
566
567
567
This request is sent from client to server to render "inlay hints" -- virtual text inserted into editor to show things like inferred types.
568
568
Generally, the client should re-query inlay hints after every modification.
569
-
Note that we plan to move this request to `experimental/inlayHints`, as it is not really Rust-specific, but the current API is not necessary the right one.
569
+
Until it gets upstreamed, this follows the VS Code API.
0 commit comments