/neotest-gtest

Google Test adapter for nvim-neotest

Primary LanguageLuaMIT LicenseMIT

neotest-gtest

A work-in-progress implementation of a Google Test adapter for neotest.

It works, but is a little rough around the edges. See the roadmap to a full-featured plugin here. Please, submit any issues you find!

Help wanted!

Though I definitely plan on maintaining this further, over the past few months I've been concentrating on other things and that is not going to change any time soon (until ~October 2023). If you're willing to invest some evenings into hacking around in Neovim, please comment in the roadmap issue and I'll try to help getting you started however I can.

Features

Provides support for all features of neotest:

  • Structured test view
  • Run file/directory/test case/test suite
  • Display errors in diagnostics
  • Helpful short test summary in a popup
  • Full test output (with colors!) in a popup

To be implemented (see roadmap):

  • Smart, configurable detection and recompilation of the test executable
  • Support for parametrized tests
  • Configurable behavior with working out-of-the-box defaults

Installation

Use your favorite package manager. Don't forget to install neotest itself, which also has a couple dependencies.

use { "alfaix/neotest-gtest" }
Plug 'alfaix/neotest-gtest'

Usage

Simply add neotest-gtest to the adapters field of neotest's config:

require("neotest").setup({
  adapters = {
    require("neotest-gtest")
  }
})

Then use neotest the way you usually do: see their documentation. You don't need to call any neotest-gtest functions for ordinary usage.

Configuration

Things aren't configurable at the moment, but they sure will be! :') You can track the progress by subscribing to the roadmap issue.

License

MIT, see LICENSE