diff options
Diffstat (limited to 'after/plugin')
| -rw-r--r-- | after/plugin/neotest.lua | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/after/plugin/neotest.lua b/after/plugin/neotest.lua new file mode 100644 index 0000000..d70d5cd --- /dev/null +++ b/after/plugin/neotest.lua @@ -0,0 +1,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 }) |