4 ms·
Wait, does that feature mean what is sounds like? That sounds too basic to be fundamentally beyond LSP.
by pxc 3y ago
Wait, does that feature mean what is sounds like? That sounds too basic to be fundamentally beyond LSP.
- _flux 3y agoYeah, it sounds like it should support it. Traditionally though OCaml editor integrations have also supported not only asking just the type of a symbol, but of an expression. I wonder if LSP can do that, because that function needs some interactive scoping of the query, not just a single point, or I suppose it can work if hovering over parenthesis but if precedency needs to be accounted for, it would be difficult to understand what the user wants to see. I've _really_ enjoyed the expression type queries in the past, but I haven't coded OCaml for a while :/.
- skitter 3y agoThat's doable in LSP - the server knows about the selection, not just the cursor position. E.g. if I use rust-analyzer (in Helix, so there aren't any protocol extension in play), select an expression and request hover info, rust-analyzer shows the expression's type.