Neovim plugin for Ruby on Rails – focused on navigation and test running,
designed for LazyVim with sensible <leader>r keybindings.
Inspired by ror.nvim by Wei Zhe. Credits are retained in the MIT License.
video.mp4
Jump from any Rails file to its counterpart.
When multiple candidates exist a Telescope picker opens automatically.
| From | To | Key |
|---|---|---|
| model / controller / view | model | <leader>rm |
| model / view / test | controller | <leader>rc |
| model / controller | view | <leader>rv |
| model / controller | test / spec | <leader>rs |
Inertia + React support – when navigating to a view (
<leader>rv) from a controller that usesrender inertia:, the plugin resolves the matching.jsx/.tsxcomponent underapp/frontend/pages/automatically.
Supports both minitest (test/) and RSpec (spec/) projects.
Run specs/tests without leaving the editor.
Results (pass ✅ / fail ❌) are shown inline in the buffer as virtual text and diagnostics.
| Action | Key |
|---|---|
| Run whole test file | <leader>rt |
| Clear test results | <leader>rX |
RSpec requires no extra setup.
Minitest requires minitest-json-reporter and minitest 5.x (minitest 6+ is not yet compatible):
# Gemfile
gem "minitest", "~> 5.25"
group :test do
gem "minitest-json-reporter"
end{
"kalebhenrique/lazyrails.nvim",
ft = { "ruby", "eruby" },
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
},
opts = {}, -- see Configuration section below
}require("lazyrails").setup({
test = {
pass_icon = "✅",
fail_icon = "❌",
notification = { timeout = false },
},
})- nvim-notify – beautiful test result notifications
- dressing.nvim – nicer
vim.ui.select/vim.ui.inputappearance - which-key.nvim – group label shown automatically under
<leader>r
| Key | Command | Description |
|---|---|---|
<leader>rm |
RailsGoModel |
Go to model |
<leader>rc |
RailsGoController |
Go to controller |
<leader>rv |
RailsGoView |
Go to view |
<leader>rs |
RailsGoTest |
Go to test / spec file |
<leader>rt |
RailsTestRun |
Run test file |
<leader>rX |
RailsTestClear |
Clear test results |
All keys live under the Rails group visible in which-key.