aboutsummaryrefslogtreecommitdiffstats
path: root/after/plugin/neotest.lua
blob: d70d5cdcdac364b3831d909c766abaf829886f8a (plain)
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
local ok, neotest = pcall(require, "neotest")
if not ok then
    return
end

neotest.setup({
    adapters = {
        require("neotest-go"),
        require("neotest-vim-test")({
            ignore_file_types = { "go" },
        }),
    },
})

vim.keymap.set("n", "t<C-n>", function()
    neotest.run.run()
end, { silent = true, noremap = true })

vim.keymap.set("n", "t<C-f>", function()
    neotest.run.run(vim.fn.expand("%"))
end, { silent = true, noremap = true })

vim.keymap.set("n", "t<C-s>", function()
    neotest.summary.toggle()
end, { silent = true, noremap = true })