add neotest and overseer #20

Merged
softinio merged 1 commit from add-neotest-overseer into main 2024-09-01 22:55:42 -07:00
3 changed files with 45 additions and 1 deletions

View file

@ -27,7 +27,7 @@ return {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "g:metals_status", "encoding", "fileformat", "filetype" },
lualine_x = { "g:metals_status", "encoding", "fileformat", "filetype", "overseer" },
lualine_y = { "progress" },
lualine_z = { "location" },
},

40
lua/plugins/neotest.lua Normal file
View file

@ -0,0 +1,40 @@
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"rcasia/neotest-java",
"nvim-neotest/neotest-python",
"stevanmilic/neotest-scala",
},
keys = {
{ "<leader>na", "<cmd>lua require('neotest').run.attach()<cr>", desc = "Attach to the nearest test" },
{ "<leader>nl", "<cmd>lua require('neotest').run.run_last()<cr>", desc = "Toggle Test Summary" },
{ "<leader>no", "<cmd>lua require('neotest').output_panel.toggle()<cr>", desc = "Toggle Test Output Panel" },
{ "<leader>np", "<cmd>lua require('neotest').run.stop()<cr>", desc = "Stop the nearest test" },
{ "<leader>ns", "<cmd>lua require('neotest').summary.toggle()<cr>", desc = "Toggle Test Summary" },
{ "<leader>nt", "<cmd>lua require('neotest').run.run()<cr>", desc = "Run the nearest test" },
{
"<leader>nT",
"<cmd>lua require('neotest').run.run(vim.fn.expand('%'))<cr>",
desc = "Run test the current file",
},
},
opts = {
adapters = {
["neotest-java"] = {},
["neotest-python"] = {
runner = "pytest",
args = { "-vvv" },
python = ".venv/bin/python",
},
["neotest-scala"] = {
runner = "sbt",
command = "test",
framework = "munit",
},
},
},
}

4
lua/plugins/overseer.lua Normal file
View file

@ -0,0 +1,4 @@
return {
"stevearc/overseer.nvim",
opts = {},
}