-
Notifications
You must be signed in to change notification settings - Fork 1.7k
inlay hints broken #12066
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
|
Is |
And which Code version are you using? |
》 code -v |
editor.inlayHints.enabled was set to true |
You're on an old commit, you should pull and recompile it. Or better, you can remove |
I use the latest version, and it work when |
i.e. when |
For me only inlay hints are broken, the rest works fine.
Removing the line from the settings fixes the problem but seems inconvenient to me. I do like having rust-analyzer being managed by a package manager so its installed and updated without the need to open VSCode. I installed the extension from the default open registry for Arch Linux Code package which is already 4 months old (0.2.853) while rust-analyzer updates weekly. Switching to the Microsoft Repositories (which can be done with installing For now I'll use the old extension version with the bundled server as that worked until there is a better/newer working solution. |
I have this issue as well, I didn't have This feature seems to be broken entirely for me, with the only option to fix it being to revert to an older version of rust-analyzer (such as the one packaged with the vscode extension as suggested by @lnicola ), but obviously this isn't acceptable as this issue will eventually be released with the plugin. Edit: For reference neither |
@Sheepyhead I'm not sure why the bundled version would be older. And how are you building and installing RA? |
You don't normally release directly from latest, normally you release stable versions. I'm building by cloning the repo and running cargo build --release, and installing by using the server path option to point to my compiled server binary. However, looking at what output I get in vscode I do get this error message WARN [3.5.2022 12.03.53]: LSP request failed { |
I figured it out! This change also requires you to rerun cargo xtask install to update the extension itself! First time I've run into that issue, but I guess this explains it |
We release nightlies every night (in UTC) and the one from Sunday/Monday gets promoted to a stable release. You can opt into the nightlies using this option:
Yeah, you should always use |
For anyone running into this, the smoking gun is the method name. It went through three iterations:
If you're getting an error about one of the first two, your Code extension is too old. If you're getting an error about the last one, your LSP server is too old. |
It is supported as long as the Using different versions of them usually works, inlay hints just happened to be a high-profile feature which saw some significant changes in a short amount of time. The option itself is not a deprecated or legacy one, and has its uses, like allowing the usage of a custom-built server on platforms where we don't have official binaries. For mainstream platforms, the Code extension already has a compatible server, and you should probably be using it.
Which version of VS Code are you using? |
Are you sure that the setting doesn't change? Note that we're trying to set it per-language, so it can show up twice in the settings JSON. There's another issue where the hints don't work immediately after toggling them. You need to type a character or switch files. Maybe you're seeing the same problem? |
@lnicola setting (unique) can be change when toggle inlayHints, but inlayHints no work |
@swq123459 what if you type something after re-enabling them? |
nothing happen |
Is it related to my running dev container? |
I'm not sure. Do they come back after you restart Code? Maybe we're toggling the local setting instead of the remote one? I don't really remember how these work. |
when I reload vscode, it work again. After that, when I toggle inlayhint or switch |
We do toggle the setting properly, but it seems if we toggle the hints back on via the command they flicker for a very short time and then disappear again. They do come back after some time for me though, so this feels like it might be a VSCode issue or an issue with how we update the setting? Edit: For me they come back if I scroll my editor. |
@lnicola Thanks for clarifying!
1.66.0 packaged by Arch Linux |
@Veykril that's #12027, but @swq123459 seems to have a different issue. @EdJoPaTo I suppose you mean 1.66? |
|
@swq123459 sounds like #12027 @EdJoPaTo when you have time can you try to comment out |
My currently installed rust-analyzer version is 20220502-1 (via pacman). tldr: I tried the following and inline hints worked:
Even 0.2.1030 which didnt worked last time worked today. No clue what caused that then. |
@EdJoPaTo okay, so it seems fixed for you. Thanks for the comprehensive testing. @swq123459 let's close this to keep things tidy. |
rust-analyzer version: (eg. output of "Rust Analyzer: Show RA Version" command)
rust-analyzer version: 24cf957 2022-04-22 dev
rustc version: (eg. output of
rustc -V
)rustc 1.60.0 (7737e0b5c 2022-04-04)
relevant settings: (eg. client settings, or environment variables like
CARGO
,RUSTUP_HOME
orCARGO_HOME
)The text was updated successfully, but these errors were encountered: