-
-
Notifications
You must be signed in to change notification settings - Fork 910
With recent releases of rust-analyzer only few inlay hints show up #3896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think that @brotzeit changed the properties, so they are compatible only with the latest version of rust analyzer. |
The same issue happens for rust-analyzer release |
Does it work with #3924 ? |
I think the right way to fix this is changing |
Yes it does, thank you! |
Sorry spoke to early, it was loading an older version of lsp. With the branch and the newest rust-analyzer release I get the following error
Stack trace looks like
|
rust-analyzer has changed the inlay hint label from string to array of structs where struct has the member *value* contain inlay hints. The algorithm just iterate over label array, and concats all *value* into one string that's printed out. "label": [ { "value": ": " }, { "value": "File", "location": { "uri": "file:///home/nikola/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs", "range": { "start": { "line": 97, "character": 11 }, "end": { "line": 97, "character": 15 } } } }, { "value": "" } Close emacs-lsp#3896 Signed-off-by: Nikola Pajkovsky <nikola@enhance.com>
rust-analyzer has changed the inlay hint label from string to array of structs where struct has the member *value* contain inlay hints. The algorithm just iterate over label array, and concats all *value* into one string that's printed out. "label": [ { "value": ": " }, { "value": "File", "location": { "uri": "file:///home/nikola/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs", "range": { "start": { "line": 97, "character": 11 }, "end": { "line": 97, "character": 15 } } } }, { "value": "" } Close emacs-lsp#3896 Signed-off-by: Nikola Pajkovsky <nikola@enhance.com>
rust-analyzer has changed the inlay hint label from string to array of structs where struct has the member *value* contain inlay hints. The algorithm just iterate over label array, and concats all *value* into one string that's printed out. "label": [ { "value": ": " }, { "value": "File", "location": { "uri": "file:///home/nikola/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs", "range": { "start": { "line": 97, "character": 11 }, "end": { "line": 97, "character": 15 } } } }, { "value": "" } Close #3896 Signed-off-by: Nikola Pajkovsky <nikola@enhance.com>
Thank you 🙇 |
Thank you for the bug report
lsp-mode
related packages.M-x lsp-start-plain
Bug description
lsp-mode version:
20230106.1721
With

lsp-rust-analyzer-server-display-inlay-hints
set tot
I get the following with rust-analyzer release 2022-12-19:With rust-analyzer release 2022-12-26:

I didn't see any errors in the lsp io log, a few hints (types in for loops) do show up.
Steps to reproduce
Open a rust buffer with
lsp-rust-analyzer-server-display-inlay-hints
enabled.Expected behavior
Inlay hints for variables etc. are shown.
Which Language Server did you use?
rust-analyzer
OS
Linux
Error callstack
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: