Get the latest tech news
Mastering Ruby Code Navigation: Ruby LSP Enhancements in the First Half of 2024
In the first half of 2024, Ruby LSP has seen significant enhancements, particularly in the area of code navigation, thanks to the advancement of its indexer. In this post, we’ll dive into the major code navigation enhancements that have been made to Ruby LSP. We’ll also touch on some experimental features that are on the horizon.
Ruby LSP’s indexer is now capable of estimating the inheritance hierarchy of your program, allowing it to locate method, variable, and constant definitions through the ancestors list. The reason this is considered an estimation is due to Ruby’s autoload feature making it difficult to determine the exact order in which files end up being required (which may impact how the inheritance chain is constructed). (Technically, this is not a Rails-exclusive enhancement, but because it enables all the previously mentioned code navigation features in view files, it brings a dramatic improvement to the Rails development experience.)
Or read this on Hacker News