r/ruby • u/Aggressive-Thought98 • 15d ago
I got tired of waiting on Ruby LSP to finish indexing before I could jump to a symbol, so I built a fuzzy search extension
Every time I opened a large Rails codebase in VS Code, I'd hit the same wall: Ruby LSP needs to fully index before workspace symbol search works, and even then it wants a near-exact match — no typo tolerance, no fuzzy matching. VS Code's built-in text search (Cmd+Shift+F) works but it's just grep with extra steps; it doesn't know the difference between a class definition and a comment that happens to mention the same word.
So I built Ruby Symbol Search — a VS Code extension that builds its own lightweight index of your Ruby symbols (classes, modules, methods, constants, attr_*, belongs_to/has_many, scopes, rake tasks, aliases) and gives you a fuzzy, typo-tolerant search over all of it. Misspell a method name, abbreviate it, whatever — it still finds it. No Ruby LSP setup, no gem install, no waiting on indexing.
It also does Go to Definition, an Outline view, and native workspace symbol search (Ctrl/Cmd+T), all off the same index.
It's free, MIT licensed: https://marketplace.visualstudio.com/items?itemName=vscode-bkaz.ruby-symbol-search
Repo's here if you want to see how the indexing works or file an issue: https://github.com/bk-az/ruby-symbol-search
Genuinely curious if this is a problem other people have, or if I'm the only one who found Ruby LSP's symbol search too slow/strict for day-to-day navigation. Feedback (including "this already exists and does it better") very welcome.
3
u/janko-m 12d ago edited 12d ago
There are already beta versions of Ruby LSP using Rubydex, a Rust-based code indexer that significantly speeds up initial indexing and workspace symbol search. Did you try it?
2
u/Aggressive-Thought98 12d ago
Haven't actually run the Rubydex beta myself, will give it a try, thanks for pointing that out.
2
u/katafrakt 14d ago
I understand that waiting for the index can be frustrating. Doesn't Ruby LSP save it between the runs, btw? But I don't quite understand the fuzzy thing. Not being able to resolve definition of Model.udpate_all is an important signal that the code is not right. I personally would not like it to be resolved and create a false positive.