summaryrefslogtreecommitdiffstatshomepage
path: root/nvim/.config
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2023-10-26 17:36:11 -0500
committerToby Vincent <tobyv@tobyvin.dev>2023-10-26 17:36:11 -0500
commit79592b1c2905da30ed04366aff01067e676bb346 (patch)
tree304f94713faa10edba187815fa747a9d16991859 /nvim/.config
parent3fda466cb302631ff09077ddda5c666404de1245 (diff)
fix(nvim): add neotest adapters and clean up config
Diffstat (limited to 'nvim/.config')
-rw-r--r--nvim/.config/nvim/lazy-lock.json3
-rw-r--r--nvim/.config/nvim/lua/plugins/neotest.lua33
2 files changed, 22 insertions, 14 deletions
diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json
index db59ac7..b7ac851 100644
--- a/nvim/.config/nvim/lazy-lock.json
+++ b/nvim/.config/nvim/lazy-lock.json
@@ -32,6 +32,9 @@
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
"neodev.nvim": { "branch": "main", "commit": "e9dd1535759794635a951644c183beb327879407" },
"neotest": { "branch": "master", "commit": "901891484db3d46ce43d56871273dc7d40621356" },
+ "neotest-go": { "branch": "main", "commit": "1a15e1136db43775214a3e7a598f8930c29c94b7" },
+ "neotest-plenary": { "branch": "master", "commit": "dcaf5ed67a9e28a246e9783319e5aa6c9ea1c584" },
+ "neotest-python": { "branch": "master", "commit": "81d2265efac717bb567bc15cc652ae10801286b3" },
"neotest-rust": { "branch": "main", "commit": "03e036a310379f132d4e39387e9076396132ce3f" },
"noice.nvim": { "branch": "main", "commit": "791c7adda821fd03529f995df2ee284ad591dabd" },
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
diff --git a/nvim/.config/nvim/lua/plugins/neotest.lua b/nvim/.config/nvim/lua/plugins/neotest.lua
index 591d802..98120ec 100644
--- a/nvim/.config/nvim/lua/plugins/neotest.lua
+++ b/nvim/.config/nvim/lua/plugins/neotest.lua
@@ -1,28 +1,33 @@
-local utils = require("tobyvin.utils")
-
---@type LazyPluginSpec
local M = {
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
+ "nvim-neotest/neotest-go",
+ "nvim-neotest/neotest-plenary",
+ "nvim-neotest/neotest-python",
"rouge8/neotest-rust",
},
}
-function M:init()
- utils.on_attach(function()
- vim.keymap.set("n", "<leader>tt", function()
- require("neotest").run.run()
- end, { desc = "run nearest test" })
- end, { name = "rust_analyzer" })
+function M:opts(opts)
+ return vim.tbl_extend("keep", opts, {
+ adapters = {
+ require("neotest-go"),
+ require("neotest-plenary"),
+ require("neotest-python")({ dap = { justMyCode = false } }),
+ require("neotest-rust"),
+ },
+ })
end
-function M:config(opts)
- opts.adapters = {
- require("neotest-rust"),
- }
-
- require("neotest").setup(opts)
+function M:init()
+ vim.keymap.set("n", "<leader>tt", function()
+ require("neotest").run.run({ suite = false, strategy = "integrated" })
+ end, { desc = "run nearest test" })
+ vim.keymap.set("n", "<leader>td", function()
+ require("neotest").run.run({ suite = false, strategy = "dap" })
+ end, { desc = "run nearest test" })
end
return M