Add neotest and overseer
This commit is contained in:
@@ -14,7 +14,7 @@ return {
|
||||
path = 1, -- 0 = just filename, 1 = relative path, 2 = absolute path
|
||||
},
|
||||
},
|
||||
lualine_x = { "location" },
|
||||
lualine_x = { "location", "overseer" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
|
||||
40
lua/plugins/neotest.lua
Normal file
40
lua/plugins/neotest.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
return {
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"adrigzr/neotest-mocha",
|
||||
},
|
||||
opts = function()
|
||||
return {
|
||||
adapters = {
|
||||
["neotest-mocha"] = {
|
||||
command = "docker exec -it api-app npm run test:integration --",
|
||||
command_args = function(context)
|
||||
-- The context contains:
|
||||
-- results_path: The file that json results are written to
|
||||
-- test_name_pattern: The generated pattern for the test
|
||||
-- path: The path to the test file
|
||||
--
|
||||
-- It should return a string array of arguments
|
||||
--
|
||||
-- Not specifying 'command_args' will use the defaults below
|
||||
local relative_path = vim.fn.fnamemodify(context.path, ":.")
|
||||
return {
|
||||
"--full-trace",
|
||||
"--reporter=json",
|
||||
"--reporter-options=output=" .. context.results_path,
|
||||
"--grep=" .. context.test_name_pattern,
|
||||
relative_path,
|
||||
}
|
||||
end,
|
||||
env = { CI = true },
|
||||
cwd = function()
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
},
|
||||
},
|
||||
consumers = {
|
||||
overseer = require("neotest.consumers.overseer"),
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
||||
7
lua/plugins/overseer.lua
Normal file
7
lua/plugins/overseer.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"stevearc/overseer.nvim",
|
||||
opts = {},
|
||||
keys = {
|
||||
{ "<leader>o", "<cmd>OverseerToggle<CR>", desc = "Toggle Overseer Panel" },
|
||||
},
|
||||
}
|
||||
@@ -33,5 +33,10 @@ return {
|
||||
end,
|
||||
desc = "Search word under cursor",
|
||||
},
|
||||
{
|
||||
"<leader>R", -- remap clashing structural replace key map
|
||||
"<cmd>Telescope resume<cr>",
|
||||
desc = "Telescope resume",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user