Open kurnevsky opened 1 year ago
Metals also sets capabilities.experimental.rangeHoverProvider: true
in the initialize response which can be used (while rust one is capabilities.experimental.hoverRange
).
I'd be open to changing rust-analyzer implementation to match that of metals!
There is an open issue in lsp protocol to allow to send ranges in hover requests. It's already implemented in some lsp servers, e.g rust-analyzer and metals. However because it's not standardized the implementation is different - metals adds an additional optional field while rust-analyzer accepts range in the
position
field. For metals it can be implemented in a hacky way like:This is useful to infer type of the selection.