A small plugin for neovim to help the Test Driven Development flow by displaying the TDD cycle step. It shows the three TDD steps - red, green, refactor - in the lualine.
I couldn't find anything related to TDD for neovim so here is a first step.
{
"maggflor/nvim-tdd",
event = "VeryLazy", -- Not so important
config = true, -- Must call setup function
},
use {
"maggflor/nvim-tdd",
config = function()
require("nvim-tdd").setup()
end
}
See below in Setup.
The plugin provides a component for lualine called tdd_step. It can be displayed like any other lualine info.
For example in the top right:
return {
"nvim-lualine/lualine.nvim",
opts = function(_, opts)
opts.winbar.lualine_z = { "tdd_step" }
end,
dependencies = {
"maggflor/nvim-tdd",
},
}
Keymap | Action |
---|---|
<leader>tn |
next: Advance to the next TDD step |
<leader>te |
end: Remove the displayed step |
- Configurable keymaps
- Configurable text
- Persistence when closing neovim
- Integration with some testing framework
- Statistics about average step duration
- Possibility to jump to current test case