Skip to content

Commit

Permalink
fix(neotest): fix opts usage in plugin spec
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 11, 2023
1 parent 3d8e13b commit 1e63a40
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions lua/astrocommunity/test/neotest/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
return {
"nvim-neotest/neotest",
config = function()
ft = { "go", "rust", "python" },
dependencies = {
"nvim-neotest/neotest-go",
"nvim-neotest/neotest-python",
"rouge8/neotest-rust",
},
opts = function()
return {
-- your neotest config here
adapters = {
require "neotest-go",
require "neotest-rust",
require "neotest-python",
},
}
end,
config = function(_, opts)
-- get neotest namespace (api call creates or returns namespace)
local neotest_ns = vim.api.nvim_create_namespace "neotest"
vim.diagnostic.config({
Expand All @@ -11,19 +27,6 @@ return {
end,
},
}, neotest_ns)
require("neotest").setup {
-- your neotest config here
adapters = {
require "neotest-go",
require "neotest-rust",
require "neotest-python",
},
}
require("neotest").setup(opts)
end,
ft = { "go", "rust", "python" },
dependencies = {
"nvim-neotest/neotest-go",
"nvim-neotest/neotest-python",
"rouge8/neotest-rust",
},
}

0 comments on commit 1e63a40

Please sign in to comment.