Closed DeclanKehoe closed 1 year ago
Also len
is unknown
Edit: now it works https://github.com/sublimelsp/LSP-rust-analyzer/issues/70#issuecomment-1188267603
I found the version of rust-analyzer download is always 2022-1-10 as this plugin set the verison in plugin.py as a certain number, I guess maybe this 2022-1-10 version cause this bug. So I change the version of rust-analyzer.exe in VScode into 2022-1-10 andthis bug appear in VScode too. Then I download the lastest version of rust-analyzer manually and replace the version of auto-download in sublime, the bug you mentioned disappear, but the inly type hints also disappear, it troubled me.
About the version, see description
https://github.com/sublimelsp/LSP-rust-analyzer/releases/tag/v1.0.4
So based on the previous two comments; it's either a bit broken, or there's no in-line hints?
there's no in-line hints
There are definitely in-line hints. This is with last Monday's Rust-Analyzer release on macOS x86_64:
Checked, now len
hover info worked
This is probably resolved since the rust-analyzer version was updated.
I am completely new to Rust and was following the tutorials (so ignore the actual functionality of the code please!) when I noticed that the autocomplete was not working for the types in std. For example, when trying to use the
.len()
method on an&str
type object.I installed rust-analyzer in two other editors; VSCode and Nova, and the
len()
method was suggested in both of those without issue, so I don't think the issue is rust-analyzer itself, just something in this implementation.Maybe this is something to do with Sublime's autocomplete engine? I'm honestly not familiar enough to provide many other suggestions as to what's wrong, just that I noticed it happening with other std types as well (like
abs
for i32 not being suggested in Sublime, but no problems in Nova & VSCode).