lawrence-laz/neotest-zig
Test runner for Zig in Neovim using Neotest backend.
https://github.com/lawrence-laz/neotest-zig/assets/8823448/9a003d0a-9ba4-4077-aa1b-3c0c90717734
zig
v0.14 installed and available in PATHzig
v0.13, then use the tagged neotest-zig
1.3.* version.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
}
.zig
files and projects using build.zig
build.zig
:wbuil.zig
must have a standard test
stepEnabling 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'