Giter VIP home page Giter VIP logo

nvim-rspec's Introduction

nvim-rspec

This plugin enables running RSpec tests within NeoVim using the built-in functions. It provides a convenient way to interact with RSpec directly from your Vim environment.

Features

  • Run RSpec tests from within NeoVim.
  • Display test results and errors in the quickfix or location list window.
  • Navigate between failing tests and their respective error locations.
  • Set custom RSpec options.

Requirements

  • NeoVim (version 0.5+) installed and working properly.
  • RSpec installed in your project (refer to your project's gemfile or use gem install rspec).

Installation

Use your favorite plugin manager to install this plugin. For example, using packer:

  1. Add the following to your plugins file: lua use("rafaellima/nvim-rspec")
  2. Reload the configuration file or restart NeoVim.
  3. Run :PackerInstall command within NeoVim to install the plugin.

Usage

To run RSpec tests, use the following commands:

Run all tests: :lua require('nvim-rspec').run_all()

Run current test file: :lua require('nvim-rspec').run_spec()

Run nearest to the cursor test in the current open file: :lua require('nvim-rspec').run_nearest_spec()

Keymaps

Configure keymaps to trigger the functions:

keymap.set("n", "<leader>,f", ":lua require('nvim-rspec').run_spec()<CR>") -- run spec for the current file
keymap.set("n", "<leader>,s", ":lua require('nvim-rspec').run_nearest_spec()<CR>") -- run nearest spec based on the current file and line

nvim-rspec's People

Contributors

rafaellima avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.