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