Comment by TheRoque

1 day ago

How come nobody came up with an LSP that can perform this, all this time ?

I've developed a small tool[1] that has helped me for the same problem, but in Python. Basically just uses simple parsers to attempt to find a definition wherever is sensible. Adding a Ruby module should not be too difficult, but it would probably be trickier than Python to get some good enough results

[1] https://github.com/federicotdn/irk

Because it's an unsolvable problem without static type annotations and as far as I'm aware Ruby doesn't have a good solution for those yet (or if they do nobody uses it).

  • Sorbet is a decent one. I don't think it ever solved "jump to definition" though. I would just `rg def (self\.)?function_name` or I eventually developed a vibe for where things were, which is sort of the Ruby excuse for the ungreppability of everything. Sorbet did allow us to generate front end types in Elm and also allowed for type safe Haskell FFI. Past tense because it's an old job; as far as I know it's still happening.