simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 160 forks source link

Inlay hints not working #404

Closed vaccarium closed 1 year ago

vaccarium commented 1 year ago

Hi, I'm seeing problems with inlay hints since updating Rust and rust-analyzer. Every time I open a Rust file, I get this error:

Error executing vim.schedule lua callback: ...im/bundle/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:199: attempt to call method 'sub' (a nil value)                                                                               
stack traceback:
        ...im/bundle/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:199: in function 'render_line'
        ...im/bundle/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:255: in function 'render'
        ...im/bundle/rust-tools.nvim/lua/rust-tools/inlay_hints.lua:165: in function 'handler'
        /usr/share/nvim/runtime/lua/vim/lsp.lua:1025: in function 'cb'
        vim/_editor.lua:256: in function <vim/_editor.lua:256>

The problem exists with rust-analyzer version 2023-01-16 but not with version 2022-12-05.

vaccarium commented 1 year ago

Sorry, somehow I failed at updating the plugin, the latest version already fixed this.