-
Hello ! First congratulations to everyone who contributed to the 0.10.0 release ! I'm reaching you about a configuration error which I face with inlay_hints. I based my configuration on kickstart.nvim and added those 2 blocks of code : In the init.lua : if vim.lsp.inlay_hint then
vim.keymap.set(
"n",
"<leader>ih",
function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({}), {}) end,
{desc = "Toggle Inlay Hints"}
)
end and in my after/ftplugin/rust.lua : -- enable inlay hints by default in rust files.
local bufnr = vim.api.nvim_get_current_buf()
if vim.lsp.inlay_hint then
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(args)
-- Wait for LSP server to start (just to be sure)
vim.defer_fn(function() vim.lsp.inlay_hint.enable(true, {bufnr = bufnr}) end, 1000)
end,
})
end (if statements are here because my config is also used in previous neovim versions) When I open a Rust file I get this error :
What I tried :
I'm a beginner with neovim configuration so did I missed something ? Thank you for your help !
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your rustaceanvim plugin version may be outdated. |
Beta Was this translation helpful? Give feedback.
Your rustaceanvim plugin version may be outdated.