Guess this works

This commit is contained in:
Jonathon Chambers 2025-05-18 10:50:25 -04:00
parent 0079504a48
commit fd44486cc7
5 changed files with 65 additions and 5 deletions

View file

@ -0,0 +1,38 @@
return {
{
'nvim-neotest/neotest',
dependencies = {
'nvim-neotest/nvim-nio',
'nvim-lua/plenary.nvim',
'antoinemadec/FixCursorHold.nvim',
'nvim-treesitter/nvim-treesitter',
'nvim-neotest/neotest-jest',
},
config = function()
local neotest = require 'neotest'
neotest.setup {
adapters = {
require 'neotest-jest',
},
}
-- Set up keybindings
local map = vim.keymap.set
local opts = { noremap = true, silent = true }
map('n', '<leader>tt', function()
neotest.run.run()
end, opts) -- Run nearest test
map('n', '<leader>tf', function()
neotest.run.run(vim.fn.expand '%')
end, opts) -- Run current file
map('n', '<leader>td', function()
neotest.run.run { strategy = 'dap' }
end, opts) -- Run with debugger
map('n', '<leader>to', function()
neotest.output.open()
end, opts)
end,
},
}