simrat39 / rust-tools.nvim

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

Handle multi-part inlay hint labels #308

Closed mattfbacon closed 1 year ago

mattfbacon commented 1 year ago

Currently the plugin shows an error message because it expects and assumes that o_hint.label is a string, but with these new multi-part inlay hints, they are an array of tables where the tables have a value attribute that contains the string of that part. I'm not sure about using the actual information that is provided by these multi-part hints (references to other items such as types, called "location links" I believe), but this patch at least retains the old behavior of just showing text.

NickHu commented 1 year ago

Duplicate of #307

mattfbacon commented 1 year ago

Nice, that PR looks better.