Skip to content

ibramsterdam/railsgun.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

3 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Railsgun.nvim

Railsgun.nvim is a lightweight Neovim plugin designed to quickly run RSpec tests or MiniTest in your Rails projects. Run individual tests or entire spec files instantlyโ€”without ever leaving Neovim.

โœจ Features

  • Run RSpec or MiniTest tests inline or the whole file with a single keybinding
  • Configurable key mappings and settings

Preview

๐Ÿš€ Installation

Using Lazy.nvim:

{
  "ibramsterdam/railsgun.nvim",
  opts = {}, -- Uses default settings
}

๐Ÿ”ง Configuration

Railsgun allows you to configure options to customize behavior

{
  "ibramsterdam/railsgun.nvim",
  opts = {
    win_type = "floating-window", -- Use "vsplit" for a vertical split
    keys = {
      run_spec = "<Leader>rs",  -- Run test at cursor
      run_all_specs = "<Leader>rss",  -- Run entire spec file
      toggle_terminal = "<Leader>st", -- Toggle terminal
    }
  }
}

๐ŸŽฏ Usage

Keybindings (Default)

  • <Leader>rs โ†’ Run RSpec test at the current line
  • <Leader>rss โ†’ Run the entire spec file
  • <Leader>st โ†’ Ability to toggle the terminal that is specified by the win_type

Running Tests via Command

You can also run tests with the :Railsgun command:

:Railsgun 15   " Runs test at line 15
:Railsgun      " Runs the whole file

You can also toggle the terminal with :Railsgunterminal

๐Ÿ“Œ Contributing

Feel free to open issues or pull requests if you have improvements, bug fixes, or feature ideas!

๐Ÿ“œ License

This plugin is licensed under the MIT License.


Enjoy fast and efficient testing with Railsgun.nvim! ๐Ÿš€

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages