-
-
Notifications
You must be signed in to change notification settings - Fork 156
Inlay hints and diagnostics not updating when only_current_line_autocmd = "CursorMoved,CursorMovedI" #228
Comments
See original issue |
For the diagnostics, its a rust-analyzer limitation. See rust-lang/rust-analyzer#3107. As for the inlay_hints, thanks for the report, I'll have a look |
Inlay hints should update properly now. Please consider using https://github.com/simrat39/inlay-hints.nvim for a better experience with inlay hints in general. |
Thanks for the quick update and the heads up for the new inlay hints plugin. I can see the inlay hints updating in real time when |
Could you check again? I pushed another fix which should fix your problem |
I'm not sure what's happened but no inlay hints are appearing now, here is my config at the minute: require("rust-tools").setup {
tools = {
autoSetHints = true,
hover_with_actions = true,
runnables = {
use_telescope = true
},
inlay_hints = {
show_parameter_hints = false,
other_hints_prefix = "<< "
},
},
-- See https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer
server = {
on_attach = require("user.lsp.handlers").on_attach,
capabilities = require("user.lsp.handlers").capabilities,
settings = {
-- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc
["rust-analyzer"] = {
checkOnSave = {
command = "clippy"
},
completion = {
callable = {
snippets = "fill_arguments"
}
}
}
}
}
} |
What about with show parameter hints set to true? |
It works when parameter hints is set to true. However, I can't seem to be enable just inlay hints for variables or just for the current line. |
Ok this should be fixed now, with 2e9e473 |
Hi, this is more of a question regarding the current behaviour of rust-tools that I'm seeing. I'm unsure whether it is a bug or not.You can see below in the gif provided that when code is edited in insert mode, the diagnostics do not seem to appear. It is only when I explicitly write to the buffer (as shown in the statusline) that the diagnostics update. Personally, I find this quite distracting as it always seems laggy and unresponsive. Especially when code is added/deleted, leading to the diagnostics overflows to the next line. I should also mention that the inlay hints do not update until I explicitly write to the buffer either.As the title says, inlay hints and diagnostics aren't updating when
only_current_line_autocmd = "CursorMoved,CursorMovedI"
. The following gif only shows the updates when the buffer is explicitly written to.Gif
My Config
init.lua
Diagnostic Information
Rust: rustc 1.62.1 (e092d0b6b 2022-07-16)
rust-tools.nvim:
modularize_and_inlay_rewrite
rust-analyzer: 2022-08-01
Neovim: v0.8.0-dev-768-gb8dcbcc73
OS: Windows Subsystem for Linux 2
The text was updated successfully, but these errors were encountered: