Ruby LSP implements the Language Server Protocol for Ruby so editors gain navigation, completion, diagnostics, formatting, and related IDE features.
Overview
Ruby LSP brings standard LSP capabilities to Ruby projects: hover documentation, go-to-definition, completion, signature help, diagnostics, formatting, code actions, inlay hints, rename, find references, semantic highlighting, folding, and workspace-wide symbol search. ERB templates are supported alongside Ruby sources.
VS Code users install the dedicated Ruby LSP extension from the marketplace and need not add the gem to the Gemfile. Other editors such as Emacs, Neovim, Sublime Text, and Zed can run the gem via `gem install ruby-lsp` and launch the `ruby-lsp` executable so project dependencies are picked up correctly.
A composed bundle mechanism avoids requiring the gem in every Gemfile while still loading project gems. Optional RuboCop in the workspace improves formatting and related features when present. Add-ons extend the server—for example Rails, RSpec, and rubyfmt integrations—via a documented add-on API.
VS Code–specific pieces include a dependencies view, Rails generator hooks, debug client integration, version manager helpers, and a test explorer with run and debug code lenses for tests.
Key features
- LSP hover and go-to-definition
- Completion and signature help
- Diagnostics and RuboCop formatting
- Workspace and document symbols
- Test code lenses in VS Code
- Composable bundle without Gemfile gem
- Add-on API for Rails and RSpec
- ERB template support
Use cases
- Ruby coding in VS Code
- Ruby LSP in Neovim or Emacs
- Rails projects with LSP Rails add-on
- Running and debugging tests from editor