neovim-rust
neovim-rust copied to clipboard
Question about updating LSP output
Hi, I'm using the most recommended setup, and the LSP output (like inline errors and lints) only update when I save my changes to the buffer with :w
. Should the output should update in real time or is it only supposed to update when the changes are written with :w
? Thanks!
I am facing the same issue. Found a similar issue in rust-tools.nvim. @sharksforarms can you confirm this behavior on your setup ?
Yes this is how it's setup for me too. I haven't had a need for an alternative as I frantically do :w
all the time 😅
I guess i am gonna get used to the same. Thanks for the info @sharksforarms. And and huge thank you for all this config.
Ok, good to know that's just how it works. The solution I'm using is mapping jw
to <esc>:w<cr>
so it updates the output.
I'm sure there's a way using an autocmd with the :LspRestart
command maybe? Not at a computer to try (for a couple of weeks)
I am facing the same issue. Found a similar issue in rust-tools.nvim. @sharksforarms can you confirm this behavior on your setup ?
Hi, I'm the one that raised that issue. I've been using the modularize_and_inlay_rewrite
branch from rust-tools.nvim
for a while, I feel like the issue I raised is actually a bug because I remember the diagnostics updating at least when I switched modes 🤔
And also, the config that I'm using... includes this option below (from the rust-tools.nvim docs):
-- Event which triggers a refersh of the inlay hints.
-- You can make this "CursorMoved" or "CursorMoved,CursorMovedI" but
-- not that this may cause higher CPU usage.
-- This option is only respected when only_current_line and
-- autoSetHints both are true.
only_current_line_autocmd = "CursorHold",
In my issue, you can see in the gif I uploaded that it's not refreshing the inlay hints even though I have the above config. I've updated the issue within rust-tools.nvim
Diagnostics not updating is a rust-analyzer thing: https://github.com/rust-lang/rust-analyzer/issues/3107
Closing for now.