simrat39 / rust-tools.nvim

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

hover_range missing handler? #235

Open pschyska opened 2 years ago

pschyska commented 2 years ago

In https://github.com/simrat39/rust-tools.nvim/blob/master/lua/rust-tools/hover_range.lua#L26: When request() is called, no handler is passed.

When calling rust_hover_range() I'm getting

Error executing vim.schedule lua callback: ...k/p/start/rust-tools.nvim/lua/rust-tools/utils/utils.lua:106: attempt to call upvalue 'fn' (a nil value)
stack traceback:
        ...k/p/start/rust-tools.nvim/lua/rust-tools/utils/utils.lua:106: in function 'handler'
        ...eovim-unwrapped-0.7.2/share/nvim/runtime/lua/vim/lsp.lua:1025: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

Additionally, using the vim command '<,'>RustHoverRange it says "no range allowed", which is counter-intuitive.

Thanks

Wjinlei commented 2 years ago

I have the same problem

WinstonMDP commented 1 year ago

Same

zdcthomas commented 1 year ago

I'm also seeing this issue.

Issue seems to be this call not including a handler as the last arg.

Pierric82 commented 1 year ago

Seeing the same behaviour, which is a pity because this it would be very useful.