Ruby Symbol Search
Ruby Symbol Search brings instant, typo-tolerant fuzzy search for Ruby classes, modules, methods, and more straight into VS Code — with zero Ruby LSP setup required.
🔥 The headline feature: Fuzzy Search
Press Cmd + Shift + R (macOS) or Ctrl + Shift + R (Windows/Linux) to fuzzy-search every Ruby symbol in your workspace in milliseconds — misspell it, abbreviate it, it still finds it. See Fuzzy Search below for details.
This is not the same thing as VS Code's built-in text search or Ruby LSP's symbol search:
|
VS Code Text Search (Cmd+Shift+F) |
Ruby LSP Workspace Symbols |
Ruby Symbol Search Fuzzy Search |
| Typo-tolerant / fuzzy matching |
❌ literal text or regex only |
⚠️ limited, near-exact matching |
✅ |
| Understands Ruby symbols, not just raw text |
❌ |
✅ |
✅ |
| Works with no language server installed or running |
✅ |
❌ needs Ruby LSP fully indexed |
✅ |
Filter results by filename inline (@filename) |
❌ |
❌ |
✅ |
| Setup required |
none |
gem install + LSP configuration |
install the extension |
This extension also provides Go to Definition, an Outline View, File-level Symbol Navigation, and native Workspace Symbol Search (Ctrl/Cmd + T) — all backed by the same lightweight, instantly-built index, with no language server to install or keep running.
Features
Fuzzy Search
The main reason to install this extension: fuzzy-match any Ruby symbol across your entire workspace, instantly, without Ruby LSP.
How to Use:
- Press Ctrl + Shift + R (Windows/Linux) or Cmd + Shift + R (macOS).
- Filter results by appending the file name after
@.
Filtered by file:
Note: To customize the key binding:
- Open Keyboard Shortcuts (Ctrl + K Ctrl + S or Cmd + K Cmd + S).
- Search for
rubySymbolSearch.search.
- Modify the key binding as desired.
Search Ruby Symbols Across Workspace (native VS Code picker)
VS Code's built-in "Go to Symbol in Workspace" picker, populated by this extension's index. Useful if you prefer VS Code's standard symbol-picker UI; for typo-tolerant fuzzy matching and filename filtering, use Fuzzy Search above instead.
How to Use:
- Press Ctrl + T (Windows/Linux) or Cmd + T (macOS), type the initials of the symbol, and press Enter.
- Optionally, filter results by file name.
Filtered results:
Go to Definition
Easily navigate to the definition of any Ruby symbol in your workspace.
How to Use:
- Press F12 to go to the definition.
- Additional shortcuts:
- Ctrl + Click or Cmd + Click: Jump to definition.
- Ctrl + Alt + Click or Cmd + Option + Click: Open definition in a split view.
- Alt + F12 or Option + F12: Peek definition.
Outline View
Get an overview of all symbols in the current Ruby file with the Outline View, accessible in the Explorer sidebar. Symbols are displayed in a tree structure for better navigation.
Go to Symbol in File
Easily navigate to any symbol within the currently open Ruby file.
How to Use:
- Press Ctrl + Shift + O (Windows/Linux) or Cmd + Shift + O (macOS).
- Type
: to group symbols by category.
List Symbols of a File
List symbols of any Ruby file in your workspace without opening the file.
How to Use:
- Press Ctrl + Shift + R (Windows/Linux) or Cmd + Shift + R (macOS).
- Type
@ followed by the file name to display the symbols.
Lightning-Fast Indexing
- Instant Indexing: Quickly scans all Ruby files in the workspace to index symbols such as classes, modules, and methods.
- Real-Time Updates: Keeps the index in sync with changes to files.
- Status Feedback: Provides real-time indexing status in the status bar.
Supported Ruby Symbols
The Ruby Symbol Search extension supports detection of the following Ruby symbols:
| Symbol Type |
Recognized Patterns |
| Classes |
class ClassName class << ClassName |
| Modules |
module ModuleName |
| Methods |
def method_name |
| Constants |
CONSTANT_NAME = value |
| Scopes |
scope :scope_name |
| Aliases |
alias alias_name original_name alias_method :alias_name, :original_name alias_attribute :alias_name, :attribute_name |
| Attributes |
attr_reader :attribute attr_writer :attribute attr_accessor :attribute mattr_reader :attribute mattr_writer :attribute mattr_accessor :attribute thread_mattr_accessor :attribute attribute :attribute date_attribute :attribute class_attribute :attribute attributes :attribute delegate :method |
| Associations |
belongs_to :association_name has_one :association_name has_many :association_name has_and_belongs_to_many :association_name |
| Namespaces |
namespace :namespace_name |
| Rake Tasks |
task :task_name |
Commands
Access these commands from the Command Palette (Ctrl + Shift + P or Cmd + Shift + P):
| Command |
Description |
| Ruby Symbol Search: Index Files |
Re-index all Ruby files manually. |
| Ruby Symbol Search: Search Symbols |
Open global Ruby symbol search. |
Installation
- Install Ruby Symbol Search from the Visual Studio Code Marketplace.
- Open a Ruby project in VS Code.
- Indexing starts automatically if
autoIndex is enabled (see Configuration).
Configuration
Customize the extension settings:
rubySymbolSearch.autoIndex (default: true):
Automatically index Ruby symbols when opening a workspace.
rubySymbolSearch.excludedFolders (default: ["node_modules", "log"]):
Exclude specific folders from indexing.
Troubleshooting
If you encounter issues with duplicate symbols appearing in global search or file search, this could be caused by conflicting extensions. Please try the following steps:
Disable Ruby LSP Extension:
- Ruby LSP will index symbols separately, leading to duplication.
- Disable it by navigating to the Extensions view (Ctrl + Shift + X or Cmd + Shift + X) and deactivating the Ruby LSP extension.
Disable Ruby-Symbols Extension:
- If installed, this extension might conflict with Ruby Symbol Search.
- Follow the same steps to disable it in the Extensions view.
Contributing
We welcome contributions!
If you encounter issues or have feature suggestions, please file an issue or a pull request in the GitHub repository.
License
This project is licensed under the MIT License.