castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.87k stars 154 forks source link

Implement Go To Type Definition #717

Open lekemula opened 1 month ago

lekemula commented 1 month ago

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_typeDefinition

Demo in VScode (since in VIM everything is too fast 🤪) solargraph_go_to_type_definition

All the necessary pieces were in place, and nothing fancy changed, mostly just exposing the functionality for LanguageServer. Almost feels like an easter egg for a new contributor like me 😄.

The only "functionality" added is ComplexType#namespaces which also utilizes existing implementation.