Skip to content

Testing management configuration

Testing

The vim-test alternatives for neovim are:

The first one is the most popular so it's the first to try.

neotest

Installation

Add to your packer configuration:

use {
  "nvim-neotest/neotest",
  requires = {
    "nvim-lua/plenary.nvim",
    "nvim-treesitter/nvim-treesitter",
    "antoinemadec/FixCursorHold.nvim"
  }
}

To get started you will also need to install an adapter for your test runner. For example for python add also:

use  "nvim-neotest/neotest-python"

Then configure the plugin with:

require("neotest").setup({ -- https://github.com/nvim-neotest/neotest
  adapters = {
    require("neotest-python")({ -- https://github.com/nvim-neotest/neotest-python
      dap = { justMyCode = false },
    }),
  }
})

It also needs a font that supports icons. If you don't see them install one of these.