init.lua/lua/configs/neotest.lua(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
local neotest = require "neotest"
local map = require("core.utils").map
neotest.setup {
adapters = {
require "neotest-go",
},
icons = {
expanded = "",
child_prefix = "",
child_indent = "",
final_child_prefix = "",
non_collapsible = "",
collapsed = "",
passed = "",
running = "",
failed = "",
unknown = "",
},
}
map("n", "<leader>tn", neotest.run.run)
map("n", "<leader>ts", neotest.summary.toggle)
map("n", "<leader>tS", neotest.run.stop)
map("n", "<leader>to", neotest.output.open)
map("n", "]t", neotest.jump.next)
map("n", "[t", neotest.jump.prev)
map("n", "<leader>tt", function()
neotest.run.run(vim.fn.expand "%")
end)
|