From f0f0a04618cbf1c59c9381d5e418eac6280e8d95 Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Sun, 1 Sep 2024 22:54:53 -0700 Subject: [PATCH] add neotest and overseer --- lua/plugins/lualine.lua | 2 +- lua/plugins/neotest.lua | 40 ++++++++++++++++++++++++++++++++++++++++ lua/plugins/overseer.lua | 4 ++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/neotest.lua create mode 100644 lua/plugins/overseer.lua diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 5b3558a..ba3a5ec 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -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" }, }, diff --git a/lua/plugins/neotest.lua b/lua/plugins/neotest.lua new file mode 100644 index 0000000..0150363 --- /dev/null +++ b/lua/plugins/neotest.lua @@ -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 = { + { "na", "lua require('neotest').run.attach()", desc = "Attach to the nearest test" }, + { "nl", "lua require('neotest').run.run_last()", desc = "Toggle Test Summary" }, + { "no", "lua require('neotest').output_panel.toggle()", desc = "Toggle Test Output Panel" }, + { "np", "lua require('neotest').run.stop()", desc = "Stop the nearest test" }, + { "ns", "lua require('neotest').summary.toggle()", desc = "Toggle Test Summary" }, + { "nt", "lua require('neotest').run.run()", desc = "Run the nearest test" }, + { + "nT", + "lua require('neotest').run.run(vim.fn.expand('%'))", + 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", + }, + }, + }, +} diff --git a/lua/plugins/overseer.lua b/lua/plugins/overseer.lua new file mode 100644 index 0000000..559779d --- /dev/null +++ b/lua/plugins/overseer.lua @@ -0,0 +1,4 @@ +return { + "stevearc/overseer.nvim", + opts = {}, +} -- 2.46.0