neotest-zig.mp4
zigv0.14 installed and available in PATH- If you are using
zigv0.13, then use the taggedneotest-zig1.3.* version.
- If you are using
- Neotest
- Treesitter with Zig support
Install & configure using the package manager of your choice. Example using lazy.nvim:
return {
"nvim-neotest/neotest",
dependencies = {
"lawrence-laz/neotest-zig", -- Installation
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim",
},
config = function()
require("neotest").setup({
adapters = {
-- Registration
require("neotest-zig")({
dap = {
adapter = "lldb",
}
}),
}
})
end
}- Can run tests in individual
.zigfiles and projects usingbuild.zig- Does not support a mix of individual files and
build.zig:w buil.zigmust have a standardteststep
- Does not support a mix of individual files and
- Exact test filtering
- Timing all tests individually
Enabling logging in neotest automatically enables logging in neotest-zig as well:
require("neotest").setup({
log_level = vim.log.levels.TRACE,
-- ...
})The logs can be openned by:
:exe 'edit' stdpath('log').'/neotest-zig.log'