-
-
Notifications
You must be signed in to change notification settings - Fork 156
Question: real-time updating of diags and inlay hints? #119
Comments
The first issue is not related to rust-tools, probably a rust-analyzer/clippy/lspconfig/nvim issue. Sorry i've been very busy so I couldn't get back to it faster |
Thanks for the info. And no worries about the delay - I appreciate the response. |
It's a rust-analyzer "feature", it only calls cargo check on each save for performance reasons. It's not a bug in neovim/lspconfig. |
Is there a known way to configure it in order to get real-time diagnostics? |
Not apart from filing a series of not-inconsequential PRs to rust analyzer. I feel like this issue should be closed (at least for the diagnostics part) and users can be redirected to rust-lang/rust-analyzer#3107. If anyone wants this situation to improve, it will require substantial investment in rust-analyzer, not neovim. |
Closing. Thanks. |
Hi there,
I've been experimenting with the rust-tools plugin and wondering about the update behaviour for diagnostics and inlay hints.
Some diagnostics appear immediately - for example if I leave off a semicolon I get an immediate update with
E Syntax Error: expected SEMICOLON
. If I add it back - the diag disappears. However, if I writelet x = 30;
, it's only when I write the buffer that I get the 'unused variable' warning (perhaps because that's from clippy)?Similar question for inlay hints. By default, if I add the above line, I'll only get the type hint when I write the buffer. If I switch to enabling
only_current_line
and setonly_current_line_autocmd = "CursorHold,CursorMovedI"
then I get a real-time update (as documented). Is there any way to enable this "update without writing the buffer" behaviour for all lines so that it happens immediately (or when switching from insert to command mode)?Thanks!
The text was updated successfully, but these errors were encountered: